Re: javascript > variable reset help!
- From: "CADD" <caddcreativity@xxxxxxxxx>
- Date: 30 Aug 2006 13:49:48 -0700
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.
It's fine because AIML is and XML-variant that gets parsed on-the-fly
and the <person/> is being passed to the javascript as requested. It's
all done via HTML on the client-side.
Check it out for yourself if you'd like:
http://www.pandorabots.com/pandora/talk?botid=875d96ffae366536
Type: "RSS baseball"
Then try "RSS donuts"
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.
It shows up on the page and everything works smooth.
Exept for the fact the link you just clicked will be the same one,
unless you clear your internet browser.
I apologize in posting in the wrong forum, but i thought a java-guy
might be able to ignore some trivial code and possibly offer a solution
Harlan Messinger wrote:
[top-posting corrected]
CADD wrote:
Harlan Messinger wrote:> <person/> is input from the user, so it would need to reset every time
CADD 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: Harlan Messinger
- 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
- Re: javascript > variable reset help!
- From: Harlan Messinger
- javascript > variable reset help!
- Prev by Date: Re: help wanted
- Next by Date: Re: CSS comma construction...
- Previous by thread: Re: javascript > variable reset help!
- Next by thread: Re: javascript > variable reset help!
- Index(es):
Relevant Pages
|