![]() |
| ||
| passing parameters to a page I have a javscript function which opens a url....The only thing is I need it to open pages with parameters, and I'm not sure how to do it: <html> If you can point me in the right direction or help me out in any way, I would really appreciate it. |
| ||
| Re: passing parameters to a page Simply concatentate URL and ARGs. In fact, you don't even need a separate variable and/or call for "args". They are simply part of the URL. |
| ||
| Re: passing parameters to a page Quote:
You can do that, but that doesn't make it using a post method. This was actually a problem my friend had, and we used some kind of xml thing to do the job, because javascript alone can't make post calls. I wish I could remember the name of it. It may have been called ajax or something. |
| ||
| Re: passing parameters to a page Well, you can only POST a message using a POST query. Any parameters passed via a URL, create a GET query. Now, you could use JavaScript, to create a form, a lot of invisible variables, populate those variables, then call the form's "submit()" method, which will POST the form. You can only do that on a page you "own", of course. "AJAX" is a funny little beast - it refers to scripting the XMLHttpRequest object. It doesn't do a POST, it fires off another request, "behind the scenes", so that the user doesn't see any page refresh. |
| ||
| Re: passing parameters to a page Quote:
I guess AJAX was it. I remember working with the XMLHttpRequest. My first intentions was to create a form, because I have seen examples of 'dummy' forms created which do basically the same thing I was looking for. Either way I appreciate the replies. |
| All times are GMT -4. The time now is 9:24 am. |
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC