homepage Welcome to WebmasterWorld Guest from 54.205.188.59
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Refresh with Get Values
Robert Poole




msg:3396908
 12:06 pm on Jul 17, 2007 (gmt 0)

Okay, I've gotten myself in a little bit of a predicament. Let's start at the top...

First of all the site is like an estate agent site, with a property search. I was using a search results page as the parent page (searchresults.php) to launch a popup which has a mortgage calculator (calc.php). I would then do some calculations and use javascript to pass them back to the parent page using the opener.location function.

The problem now is that the parent page itself was generated from a search, so simply loading the page will lose all of the search information that was passed to it.

So what I need to do is refresh the search results page as to not lose the search criteria, but then also have the page include the parsed values, (like searchresults.php?myvalue=7).

So it's like I need to do load and refresh in one. Is this in anyway doable? Or at least is there a way around the problem?

Any help would be appreciated.

 

DrDoc




msg:3398273
 4:22 pm on Jul 18, 2007 (gmt 0)

Have you tried passing important information (such as the search query) to the popup window first? Then, when setting window.opener.location.href you can ensure that you get the entire query string.

Robert Poole




msg:3398844
 8:46 am on Jul 19, 2007 (gmt 0)

I don't really think there's a way to do this in my example, mainly because the whole search thing was coded by someone els e and it uses xml and i'll be damned if i can figure it out.

i just want the function in the popup window to be like

window.parent.reload='http://www.example.com/searchresults.php?ionumber=<? echo $interest;?>&ioduration=<? echo $duration;?>';"

but when i do this i lose the values off the end of the address. i just need some way of doing like

reload "myparentlink.php" and "myparentlink" = "myparentlink"+"?ionumber=<? echo $interest;?>"

or something along those lines... just a way of refreshing but to include the new values

[edited by: DrDoc at 9:37 am (utc) on July 19, 2007]
[edit reason] examplified [/edit]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved