Thanks Karl, yes, I am using the form plugin on the second form for image upload.
On May 15, 12:32 am, "Karl Rudd" <[EMAIL PROTECTED]> wrote: > I think I see now. You should be able to parse the response (the > 'data' argument from the sucess function) that you get back from the > ajax call and filter out the ID. > > For instance, if the response is as follows: > > <html><body> > <!-- id=1231234 --> > <p>Thank you</p> > </body></html> > > You could do something like this (untested): > > $('#myform').ajaxForm( function(data) { > > var imageLoc = data.exec(/<!-- id=(\d+) -->/); > if ( imageLoc ) > $("#create_image_location").val( imageLoc[0] ); > > // ... > > }); > > I'm assuming, based on your other emails, that you're using the Form Plugin. > > Karl Rudd > > On Thu, May 15, 2008 at 3:18 PM, hubbs <[EMAIL PROTECTED]> wrote: > > > Karl, this isn't possible, as it is part of an Administration > > Interface that I am building. Basicly, an ID number gets generated on > > a "Thank you" page of a form, this page, along with the ID is pulled > > into another page using ajax. This second page, uses that ID as a > > location to create an image. So, I somehow need to pass that ID, > > which is in a var, into that second form. > > > Let me know if I can be more descriptive. > > > On May 14, 10:03 pm, "Karl Rudd" <[EMAIL PROTECTED]> wrote: > >> It'd be easier if you could provide a link to a "live" page. It's a > >> bit hard to know exactly what you're trying to do. > > >> Karl Rudd > > >> On Thu, May 15, 2008 at 2:56 PM, hubbs <[EMAIL PROTECTED]> wrote: > > >> > I have a variable that is set on another page, and then is brought > >> > through ajax into another page. On that page, I would like to copy > >> > that variable into an input field. I thought I had the code correct, > >> > but for some reason, it is not working. > > >> > <script type="text/javascript"> > >> > function setImageLocation() > >> > { > >> > var imageLocation = 1234; > >> > $("#create_image_location").val() = imageLocation; > >> > } > >> > </script> > > >> > Also, is there a way to copy the the value to the input field, right > >> > when it is brought in through ajax? Or do I HAVE to copy it with an > >> > event?