HighDots Forums  

Re: URL auswerten

Javascript (German) Programmiersprache JavaScript. (de.comp.lang.javascript)


Discuss Re: URL auswerten in the Javascript (German) forum.



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

Default Re: URL auswerten - 11-07-2003 , 08:28 AM






Ingo Rößler wrote:

Quote:
wie bekomme ich es hin, dass beim Aufruf von
http://www.domain.com/index.htm?vari=6
die Variable vari ausgewertet wird und falls gleich 6 das Fenster
geöffnet wird
location.search ist Dein Freund, hier:

if (!!location.search.match(/(^\?|[&;])vari=6([&;]|$)/) {
window.open(...);
}

Eine universelle Funktion, das das Ganze ähnich komfortabel wie
unter PHP anbietet, habe ich hier gepostet:
http://groups.google.com/groups?selm...&output=gplain

Mithilfe dieser Funktion sähe Obiges dann so aus:

var mypar = new parsedSearchParams();
....
if (mypar['vari'] == '6') {
window.open(...);
}

ciao, dhgm



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.