Re: javascript > variable reset help!



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:
CADD wrote:
I've used http://www.bloglines.com to add RSS feeds to my sites there
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.
When do you expect them to "reset", and why? There isn't anything here
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?

> <person/> is input from the user, so it would need to reset every time
> 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.

.



Relevant Pages

  • Re: Obstacles for Tcl/Tk commercial application development ?
    ... printing tabular-report type data? ... is that most modern desktops will have a web browser available. ... - Generate HTML using the tcllib HTML package. ... Javascript like the following: ...
    (comp.lang.tcl)
  • Re: JS, DOM and tr... IE problems!
    ... I've got a problem with javascript and DOM. ... Capitalisation is often used in HTML markup, ... If you post what your browser is actually getting (e.g. using view ...
    (comp.lang.javascript)
  • Re: WebControl.Attributes.Add and custom attributes
    ... you are confusing attributes with javascript properties. ... some html attributes are used to set properties. ... when the browser parses the input node, it set properties for name, id, type and value attributes which have the same name. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: VB6 : WebBrowser Control : Disablign JavaScript support
    ... The problem is that I have an existing site that I am reading the HTML ... JavaScript version, but I also see a bunch of noscript portions. ... WebBrowser control does not yield the exact same html source. ... settings to change for each IE setting! ...
    (microsoft.public.vb.general.discussion)
  • Re: No TABLES in html. No hacks in CSS. Any layout possible, crossbrowser. Try it.
    ... content, clean html, separating defining visual aspects from defining ... them in the browser as they would be if the author had coded them ... And writing semantic html is writing html ... By switching to Javascript to lay out your page, ...
    (comp.infosystems.www.authoring.html)