Re: javascript > variable reset help!
- From: Harlan Messinger <hmessinger.removethis@xxxxxxxxxxx>
- Date: Wed, 30 Aug 2006 14:31:28 -0400
[top-posting corrected]
CADD wrote:
Harlan Messinger wrote:> <person/> is input from the user, so it would need to reset every timeCADD wrote:I've used http://www.bloglines.com to add RSS feeds to my sites thereWhen do you expect them to "reset", and why? There isn't anything here
and setup javascript in my website to search bloglines for the input
term.
The code below works perfect, but I have 1 minor issue, hopefully
someone more family with javascript can help me out with.
1) the variables do not reset, so any future searches return the same
previous returned link, unless i clear settings/cookies.
to reset. You're declaring a bunch of variables, and defining them
explicitly with hard-coded values in the declaration.
The <person/> thing is bizarre. What's that supposed to be?
> the user typed in a new phrase.
>
> that part works fine, but the variable retains that value and i would
> like it to terminate the input once the link is returned.
How does it work fine, when "<person/>" is just a character string that doesn't do anything? You must be using some underlying server-side platform that does something with this, but it isn't HTML and it isn't Javascript. Besides, you don't even show any form fields for a user to enter input, so how can it be "input from a user"? All you have is
<a href="javascript:Popup()"><person/></a>
which is a link that executes the function Popup()--if the user can find it, because it won't show up on the page. That, in turn, is because the only thing between the opening and closing A tags is a <person/> tag that the browser won't recognize as HTML and will therefore ignore.
> the functionality of the script works flawlessly, just the variable
> doesn't reset for new input unless you clear your browser settings.
>
> var name = "<person/>" needs to reset every time i run the code,
> without me having to clear my settings.
Every time, name will equal "<person/>". First time, every time. Because that's what you're setting it to.
.
- Follow-Ups:
- Re: javascript > variable reset help!
- From: CADD
- Re: javascript > variable reset help!
- References:
- javascript > variable reset help!
- From: CADD
- Re: javascript > variable reset help!
- From: Harlan Messinger
- Re: javascript > variable reset help!
- From: CADD
- javascript > variable reset help!
- Prev by Date: Re: GRAPHIC SHIFT TEXT
- Next by Date: Re: GRAPHIC SHIFT TEXT
- Previous by thread: Re: javascript > variable reset help!
- Next by thread: Re: javascript > variable reset help!
- Index(es):
Relevant Pages
|