You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dave Newton <ne...@yahoo.com> on 2007/02/11 15:21:03 UTC

[OT] RE: Struts action call in a JS method returns blank page

--- Christopher Loschen <CL...@axeda.com> wrote:
> parent.document.resultDiv.innerHtml =
> document.resultDivTemp.innerHtml;

I know that was from memory, but IIRC it's innerHTML,
so just in case.

> Another possibility is that the button I'm pressing
> to move from page to page appears on the page BEFORE
> the form appears (above it vertically) and so the
> form might not yet be fully defined at that point on
> the page, but that doesn't make sense to me either,
> because if that were a problem, then there's no way
> I could ever use a control that appears earlier on
> the page than a form, and I see that on websites all
> the time.

Just bear in mind that any Javascript that isn't
executing within a function is called in the order
it's loaded, so if you have "naked" Javascript before
the form is on the page it will fail:

<script>
  var foo = document.form.uhoh.value;
</script>

<form name="uhoh".../>

Nope.

In any case, what you're doing probably shouldn't
crash Firefox/Firebug, so I'd file a ticket once you
reproduce a minimal testcase.

I'd still like to know what happens if you ask for

var boxesAcross =
    checkForm.elements['checkbox_ids_across'].value;

in the Firebug console, though.

d.



 
____________________________________________________________________________________
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: [OT] RE: Struts action call in a JS method returns blank page

Posted by Christopher Loschen <CL...@axeda.com>.
Thanks Dave,
 
I'm sure that innerHTML was my faulty memory since I didn't write that code and haven't touched it, but I will double-check tomorrow.
 
Thanks for the other ideas too -- I think all the relevant code is inside a function but I'm not entirely sure, so I'll double-check that too.
 
Chris

________________________________

From: Dave Newton [mailto:newton.dave@yahoo.com]
Sent: Sun 2/11/2007 9:21 AM
To: Struts Users Mailing List
Subject: [OT] RE: Struts action call in a JS method returns blank page



--- Christopher Loschen <CL...@axeda.com> wrote:
> parent.document.resultDiv.innerHtml =
> document.resultDivTemp.innerHtml;

I know that was from memory, but IIRC it's innerHTML,
so just in case.

> Another possibility is that the button I'm pressing
> to move from page to page appears on the page BEFORE
> the form appears (above it vertically) and so the
> form might not yet be fully defined at that point on
> the page, but that doesn't make sense to me either,
> because if that were a problem, then there's no way
> I could ever use a control that appears earlier on
> the page than a form, and I see that on websites all
> the time.

Just bear in mind that any Javascript that isn't
executing within a function is called in the order
it's loaded, so if you have "naked" Javascript before
the form is on the page it will fail:

<script>
  var foo = document.form.uhoh.value;
</script>

<form name="uhoh".../>

Nope.

In any case, what you're doing probably shouldn't
crash Firefox/Firebug, so I'd file a ticket once you
reproduce a minimal testcase.

I'd still like to know what happens if you ask for

var boxesAcross =
    checkForm.elements['checkbox_ids_across'].value;

in the Firebug console, though.

d.




____________________________________________________________________________________
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org