lwhitb1 wrote:
> [...] Thomas 'PointedEars' Lahn [...] wrote:
>> carlos wrote:
>>> I am writing the below javascript to populate an array with content
>>> that I get from a google blog feed. I load the first array items value
>>> by doing an innerHTML on a DOM element. The problem I am facing is
>>> that when a user clicks the next button, I want my javascript function
>>> (showNext) to get the next array item, and inject that array value in
>>> the dom element. It seems to be working, but after I inject the new
>>> content, the page is being reloaded,
>> There is your problem. You have to prevent the reload.
>> [...]
>>> Can someone take a peak at the code and give me some suggestions?
>>
>> You should post how you call these methods.
>> [...]
>
> Thanks for the feedback.
You are welcome. Please trim your quotes to the minimum required to retain
context:
http://www.jibbering.com/faq/faq_not...s.html#ps1Trim
It would also be appropriate if you chose only one pseudonym to post,
although a real name would be appreciated even more.
http://rfc-editor.org/rfc/rfc1855.txt
> I call the page_load function in the body onload tag like below: It
> doesn't require a parameter. I should have removed the query parameter
> in the previous post.
>
> body onload="javascript
age_load();"
Then that is pointless. No parameter means static code:
<script type="text/javascript"
src="http://bikebr.blogspot.com/feeds/posts"></script>
And `javascript
:' is a URI scheme that does not belong into event handler
attributes where it only serves as a label, if that.
> Do you have any suggestions as to how I can prevent the page from
> reloading, or from preventing the destruction of the global variable?
If you posted the *calling* code, I might have some.
PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16