You are here: Re: javascript > variable reset help! « HTML « IT news, forums, messages
Re: javascript > variable reset help!

Posted by CADD on 08/30/06 20:49

> 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.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация