Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 08-20-2007, 03:15 PM Refresh a page???
Super Talker

Posts: 116
Name: Paul
Location: South Africa
Trades: 0
Hi there all, I was wondering how to do this, I have a website named www.higuide.co.za on the homepage there are 2 dynamic dropdown lists, once your selection has been made, and submitted it takes you to the next page, problem is that if you hit the back button in IE7 to go back to the homepage the lists are already propogated but they are not correct you now have to refresh to get them back, how can I et around this issue.

Please explain in depth if possibe, I am not the quickest off the mark, and although I always considered myself to be quite smart, I think I have bitten off more that I can chew with all this php, javascript, ruby, ajax, sql stuff.
scorpioserve is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-20-2007, 03:19 PM Re: Refresh a page???
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
Ok im sorry im confuesd what you mean.

i jst looked at it in IE7 and it works exactly how i would expect...

you select the thing it takes you to a place you clickback it takes you to the home page because it was the last page you were on...


whats the problem?
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 08-20-2007, 03:24 PM Re: Refresh a page???
Super Talker

Posts: 130
Trades: 0
if I'm understanding you correctly, you might be able to reset them using a javascript function and then call that function in the onload.
__________________
flann

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
flann is offline
Reply With Quote
View Public Profile
 
Old 08-20-2007, 03:30 PM Re: Refresh a page???
Novice Talker

Posts: 7
Trades: 0
just use java function...
vander is offline
Reply With Quote
View Public Profile
 
Old 08-20-2007, 03:40 PM Re: Refresh a page???
Super Talker

Posts: 116
Name: Paul
Location: South Africa
Trades: 0
Quote:
Originally Posted by dansgalaxy View Post
Ok im sorry im confuesd what you mean.

i jst looked at it in IE7 and it works exactly how i would expect...

you select the thing it takes you to a place you clickback it takes you to the home page because it was the last page you were on...


whats the problem?
Problem is that when you start the first list says "Select A Location" so select say Kwa-Zulu Natal
Now in the second dynamically propogated list it says "Select A Category" and that list has 23 items in it now select the first one and submit.
A new page opens with the result, great now hit the back button on the browser. For some reason the first list has the initial selection instead of the default one and the second list has lost the 23 items in it.

Also thanks for getting back so fast.
scorpioserve is offline
Reply With Quote
View Public Profile
 
Old 08-20-2007, 03:45 PM Re: Refresh a page???
Super Talker

Posts: 116
Name: Paul
Location: South Africa
Trades: 0
Quote:
Originally Posted by flann View Post
if I'm understanding you correctly, you might be able to reset them using a javascript function and then call that function in the onload.
Please expand on this I know what javascript is and im in the process of learning it, sorry rephrase TRYING to learn it, but I need more brains, got any to loan me.

Also will this function just continue refreshing the page over and over or just once as I tried something similar I think and it kept refreshing in a loop so I could not even make a selection, so I tried settin the expire to something like 10000 seconds but that too did not work as expected it made it that I could make a selection then go to the page but if I used the back button before 10000 seconds was up it would not refresh when I got back unless I waited out the entire 10000 seconds.
scorpioserve is offline
Reply With Quote
View Public Profile
 
Old 08-20-2007, 03:49 PM Re: Refresh a page???
Super Talker

Posts: 116
Name: Paul
Location: South Africa
Trades: 0
Someone else said use a cookie that stores the value on the next page and then passes it back, but once again my ignorance got the better of me and after about 3 hours of trying that I was lost and had to revert back to my backup of the pages code.

Maybe someone here knows how I can get this to work with a full set set of instructions.
scorpioserve is offline
Reply With Quote
View Public Profile
 
Old 08-20-2007, 04:03 PM Re: Refresh a page???
Super Talker

Posts: 130
Trades: 0
i'm not that great at javascript either, but I kind of know how you could do it.

PHP Code:
<body onload="TCN_reload(document.getElementById('loc_id'))"
It's something like this I think. Give it a try and play with it and maybe someone else can give you a better answer.

Also, it won't keep calling this function like you were worried about.
__________________
flann

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
flann is offline
Reply With Quote
View Public Profile
 
Old 08-20-2007, 04:19 PM Re: Refresh a page???
Super Talker

Posts: 116
Name: Paul
Location: South Africa
Trades: 0
Quote:
Originally Posted by flann View Post
i'm not that great at javascript either, but I kind of know how you could do it.

PHP Code:
<body onload="TCN_reload(document.getElementById('loc_id'))"
It's something like this I think. Give it a try and play with it and maybe someone else can give you a better answer.

Also, it won't keep calling this function like you were worried about.
Woooohoooo this not only fixed the problem but improved on what I thaught the result was going to be, somehow this keeps the first selection of the location so I do not have to reselect it and resets the second selection with all the correct categories, hehehe thanks man, my last try was about 10 lines of code and it did not work, your suggestion was a few words and wow.
scorpioserve is offline
Reply With Quote
View Public Profile
 
Old 08-20-2007, 04:27 PM Re: Refresh a page???
Super Talker

Posts: 130
Trades: 0
that's great!!! I'm just glad I could actually remember some javascript.
__________________
flann

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
flann is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Refresh a page???
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.30343 seconds with 12 queries