HighDots Forums  

Javascript and QString

JavaScript discussion (multi-lingual) JavaScript discussion (alt.comp.lang.javascript)


Discuss Javascript and QString in the JavaScript discussion (multi-lingual) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Fabio
 
Posts: n/a

Default Javascript and QString - 12-10-2006 , 06:11 AM






I know the syntax for variable "variabletopass" in ASP:

www.destinationpage.asp?variable=<%=variabletopass %>

What's the syntax for Javascript?

Thks

Fabio



Reply With Quote
  #2  
Old   
Scott Bryce
 
Posts: n/a

Default Re: Javascript and QString - 12-10-2006 , 10:42 PM






Fabio wrote:
Quote:
I know the syntax for variable "variabletopass" in ASP:

www.destinationpage.asp?variable=<%=variabletopass %

What's the syntax for Javascript?
Are you trying to pass some value from one page to another page to be
parsed using JavaScript? If that is what you want to do, the syntax is
the same.

www.example.com?myvar=somevalue

Of course, the variable name in JavaScript doesn't necessarily have to
be myvar. It can be anything you assign somevalue to.

What is it that you are trying to accomplish?


Reply With Quote
  #3  
Old   
Fabio
 
Posts: n/a

Default Re: Javascript and QString - 12-11-2006 , 08:08 AM




Quote:
What is it that you are trying to accomplish?
This is my span container string:

<span class="rosso"
onclick="location.href='frame_ricercamusica_respon so.asp?parolachiave='+Vari
able; return false">Click here!</span>

It works greatly, but I'd like to target the link to a frame called "center"
which is part of another open window. Can you help me? Thks

Fabio




Reply With Quote
  #4  
Old   
Scott Bryce
 
Posts: n/a

Default Re: Javascript and QString - 12-11-2006 , 11:15 AM



Père Noël wrote:
Quote:
Scott Bryce <sbryce (AT) scottbryce (DOT) com> wrote:


www.example.com?myvar=somevalue

Of course, the variable name in JavaScript doesn't necessarily have to
be myvar. It can be anything you assign somevalue to.


could that be used to mimic cookies ?
Yes, but it would be a pain. If you ever lost the ?myvar=somevalue, you
will have "tossed your cookies" so to speak. Your code would have to
insure that the ?myvar=somevalue was tacked on to every link. If the
user left the site, then returned, the "cookie" would be lost. Using a
cookie would make your life much easier.

Quote:
how could i add "?css_theme=the_choosen_theme"

to an url in the form of :

file:///Path/to/help/dit/THE_HELP.html

and get it back from one page to the other ?
Someone else is going to have to answer that one. It has been years
since I have attempted it. I handle this sort of thing on the server
side now.


Reply With Quote
  #5  
Old   
-Lost
 
Posts: n/a

Default Re: Javascript and QString - 12-19-2006 , 09:57 AM



"Fabio" <fabespNOSPAMCAPITO (AT) fastwebnet (DOT) it> wrote

Quote:
What is it that you are trying to accomplish?

This is my span container string:

span class="rosso"
onclick="location.href='frame_ricercamusica_respon so.asp?parolachiave='+Vari
able; return false">Click here!</span

It works greatly, but I'd like to target the link to a frame called "center"
which is part of another open window. Can you help me? Thks

Fabio
window.frames[frame_num].location.href = 'http://domain.com/?foo=bar';

-Lost




Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.