This topic is locked
[SOLVED]

 Button to open another view page

3/31/2011 9:37:12 AM
ASPRunnerPro General questions
G
gdmacdo author

I have a table called Parent_Invite. I want to create a button at the bottom of Parent_Invite_view.asp that will open the equivelent page in view (Parent_Invite_Spanish) that will have the page content in Spanish. I have tried the following button code(s) with no luck :
location.href="Parent_Invite_Spanish_view.asp?editid1=" & keys("ID")
Or
response.redirect("Parent_Invite_Spanish_view.asp?editid1="& keys("ID"))
Can anyone help with the code?

Sergey Kornilov admin 3/31/2011

Try the following in ClientBefore event:

var regexS = "[\\?&]editid1=([^&#]*)";

var regex = new RegExp( regexS );

var results = regex.exec( window.location.href );

window.location.href="Parent_Invite_Spanish_view.asp?editid1=" + results[1];
G
gdmacdo author 4/1/2011

This worked perfectly! Thank you so much for the quick reply.



Try the following in ClientBefore event:

var regexS = "[\\?&]editid1=([^&#]*)";

var regex = new RegExp( regexS );

var results = regex.exec( window.location.href );

window.location.href="Parent_Invite_Spanish_view.asp?editid1=" + results[1];