View Full Version : Grrrr....Javascript....Redirection after clicking a link.


I am me
03-31-2003, 02:10 PM
Ok, this isnt as easy as the title suggest.

I would like an automatic URL forwarding code, that I cannot script myself!

Basically it works the same as this would work

<script>window.location="http://My URL here"</script>

However I only want that to take place after a submit button has been pressed, rather that when you load onto that page.

It would work how the bravenet forms work, your page laods, you fill in the form, click submit, then the page where all the data gets sent to you see load at the bottom of the screen, but the page goes straight to the URL you wanted to.

Let me explain myself a bit more.





The response-o-matic forms; (I am not using a respinse-o-matic form, I am explainnig how I would like the effects of teh redirection)




You fill out the required form, click submit & then your are taken to the response-o-matic page which says something like "thank you for filling out the form, please click here to retur back to the page" So you click the link & go back to the page.

What I am after is something the works the same way as the bravenet forms, where you theoretically skip the response-o-matic set page (although all the info on the form loads/gets sent/recorded/etc accordingly) to return to the url you want.

Seeing as you cant edit the response-o-matic set page to redirect automatically to the url you want, I am looking for some kind of script that would allow, on the press of the submit button, the page to do a 'double load' (what I described above)

This is kinda hard & I am not great at javascript so my efforts at making something like this (Yes I have assumed it works by javascript) have failed miserably!

the_dark_one02
03-31-2003, 04:19 PM
like your saying "the same as a bravnet form" why not use a bravenet form?? it would make life easier for you!!

I am me
03-31-2003, 05:07 PM
No, no, no, lol.

I dont want a form!

Gosh...no!

Its my guestbook. I need a code of some sort that would fit in the <post method=action"http//automatic web site confirmationof signin page"> so as when that link was clicked, that page would sending all necessary information, but straight away automaticlly redirect to a page I want, without setting sight on the ugly defualt conformation guestbook page, which just has a link anyway.

*Sigh* That was much easier than all the rest I typed above,

the_dark_one02
03-31-2003, 05:17 PM
oh i see i thought u ment it was a form.

MaGiCSuN
03-31-2003, 05:38 PM
in most guestbooks you are able to customize this ont he webpage itself. But still here's the code:

<INPUT type="hidden" name="thankyou" value="urlhere">

this is what i have, but i use it for a form. ON another website i found this:

<input type="hidden" name="mail-redirect" value="http://www.yahoo.com">

just try it out. I hope it works ;)

Love,
Mirna

I am me
03-31-2003, 08:35 PM
Bless you, I'll give it a go right now...


*I am me starts whispering frantically*
"please work, please work, please work"

I am me
03-31-2003, 08:41 PM
By the way, the guestbook is signmyguestbook.com "tut tut tut"

The guestbook that is 100% fully customisable accept I cant seem to find an ooption that allows me to make more than 1 post every 30 hour. So If I try one code & when Ipost it doesnt work...lol...I will have to wait half an hour to try the other.

I should have stuck with alxnet....

I am me
03-31-2003, 09:23 PM
Ok, I found this....I havnt got a clue were to insert it though, first instintcs was to change;
<input type=hidden name="redirect" value="http://my-illusions.signmyguestbook.com/">


<input type=hidden name="username" value="my-illusions">

to

<input type=hidden name="redirect" value="http://my-illusions.signmyguestbook.com/">

Nope. Stupid guestbook told me 'Oops, you havnt filled out the forms' Even though I had

So then I just inserted the code before, after...everywhere!
No luck...grrrrrr