Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Urgently Need Help

Status
Not open for further replies.

sleuth

Programmer
Jan 12, 2001
134
US

Hello, I have a framed page and I need to access the form values in one frame, which is outside the frame of the button,

I'm, trying to use this

top.maincontent.topinsert.insideTop.window.document.form.delete.value

But it comes back undefined, "delete" is the name of the check boxes. When it was in the same frame it was working fine, but then I had to move it out and now I can't get to the checkboxes, Is the document object accessible?

Thank You

Tony "Java?? Umm, I think that's the stuff I drink while I'm coding perl."
 
Ok, I found out the hard way that javascript doesn't read check boxes that way, and that the document object is being accessed but I need to loop through the checkboxes, here's as far as I've gotten,

<script>
<!--//
function Get(){
for (var i=0; i < top.maincontent.topinsert.couponTop.window.document.form.elements.length; i++)
{
var e = top.maincontent.topinsert.couponTop.window.document.form.elements;
if (e.name == &quot;coupons&quot;)
{
if (e.checked == true){
return_me = e.value + '~~';
}}}
return return_me;
}
//-->
</script>

Now the return_me is supposed to be like,

1~~12~~13~~18

You know what I mean?

I have a location.href=''; Thing in a button, now what I did was,

onclick=&quot;location.href=' + Get();&quot;

Hope that's clear, if you submit a form and all the selected checkboxes have the same name, then it'll delminate the values with ~~, so my program is wanting them like that.

Is there anyway I can do something like

return_me .= &quot;value&quot;;

The .= in perl means to add to the variable, so if it loops through it four times, it'll have four values,

Is there any way I can have my routine return the values in one line the way I need them?

Thanks,

Tony &quot;Java?? Umm, I think that's the stuff I drink while I'm coding perl.&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top