-
AJAX + Load URL in IFrame
Hello,
I'm trying to implement the AJAX for loading the url in iframe. I have one combo box listing the names of site. In the database i have table with fields SiteName & URL.
I want to load the url of selected combo item in iframe without refreshing the mail page where the combo box & iframe is placed.
Is this possible? If not, is there any other solution to load url in my main page without refreshing it.
Thanks in advanced.
-
-
Umm.... you don't need ajax.
The iframe and ajax are two seperate solutions to not refreshing the whole page.
Using javascript to change the src of the iframe is the answer.
Or you could use Ajax and embed directly in your page.
I can't tell you the exact code myself, though, sorry.
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
-
Thanks
Thanks!!!
Now i want to use POST method in AJAX to submit the current page in the same page with some changed parameter values in the url.
e.g. my form name is main.asp & after submiting page I want to redirect it to same page with main.asp?username=abc.
Is this possible without using form.submit. i.e. refreshing the page.
Thanks in advance.
-
-
I don't see metion of an iframe, so you would, yes, need to use Ajax.
Really, I don't know Ajax, just what it can do. So I'm not sure.
If you want to use it, look into the script here on DD, called "basic Ajax routine" which should (I think, though I haven't used it) give you enough to do a simple operation like 'get a page' (including using post data; I think that's included).
However, note that get and post are two different methods of sending data with a form and post can only be used with forms (and several other methods, ajax and flash among them, but very infrequently used), whereas get can just be appended any URL. They function in the same way, but get is in/from the url whereas post is hidden in the background. What you said is post, but your example seems to be get. In the case of get, it's really easy, just using the url. In the case of post, it becomes harder if you want to avoid a form.
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks