Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing Variables

Status
Not open for further replies.

kelfuego

MIS
Jun 5, 2002
74
US
Ok so I have a database driven site in which users enter information into a job postings db and then the postings are displayed as a list on another page.

When potential employees come look at the list they are able to click on a title of a specific job to see the job description. This of course is working pretty cool with the variable being passed through the url to the next page.

Unfortunately the "powers that be" like it so much that they want to link other corporate websites to it and want the job descriptions to popup into a new window. Here in lies the problem.

My assumption is that I will have to use either a session variable or cookies to pass the information to the new window. Unfortunately, I'm feeling quite cloudy on how do to this or for that matter which way would be the most appropriate way to accomplish my goal. I've been reading up on these items and have tinkered with it, but I simply cannot figure it out. below is a the code line I have been messing with. Any Help would be great.

<td><div align="left"><strong> <%Session("MyNewSessionVar")= (Recordset1.Fields.Item("Positiontitle").Value)%><A HREF="JobView.asp?<%= MM_keepURL + ((MM_keepURL!="")?"&":"") + "JobId=" + Recordset1.Fields.Item("JobId").Value %>"></A><A href="#" onClick="MyWindow=window.open('jobview.asp','MyWindow','toolbar=no,location=no,directories=yes,status=yes,menubar=yes, scrollbars=yes,resizable=yes,width=650,height=300,left=55'); return false;"><%=(Recordset1.Fields.Item("Positiontitle").Value)%></A>

Kelly Johnson MCP
Volunters of America Oregon
 
Why not just pass the parms in the url to the new window.

Code:
onClick="MyWindow=window.open('jobview.asp?var1=<%=val1%>&var2=<%=var2%>....etc...

ToddWW
 
Oh.. Or are you trying to submit a form collection to the new window. That's a little tricky, but I know it's possible. If you are, change your form method to post. Then I know it's possible to post the form to a new window, I just don't know how off the top of my head. Try looking in the JavaScript forum if this is what you are trying to do. It's definitely possible as I looked into it a few years back, tested it, and it worked.

ToddWW
 
OHHHHHHHHH YESSSSSSSSSSS I solved the problem.
I got it guys
I replaced :
if(curr=="undefined"){
curr=1}
with this:
if(isNaN(curr)){
curr=1}
and the page is displayed as wished.
Thanks for everyone who helped.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top