homepage Welcome to WebmasterWorld Guest from 54.234.228.64
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
JS and <IFRAME>
jayer




msg:3844140
 9:50 pm on Feb 6, 2009 (gmt 0)

First question, if you were to guess, what % of people use browsers without JavaScript enabled?

Second,

I have an <IFRAME>:

<IFRAME WIDTH="600" HEIGHT="0" FRAMEBORDER="0" ID="cart" NAME="cart" SRC="http://www.example.com"></IFRAME>

I want the IFRAME to show (so change the height to 600) when a submit button is clicked (so onclick() for the button or onsubmit() for the form).

I have tried numerous snippets of code within the onsubmit() and onclick() along the lines of:

document.getElementByID('cart').height = 600;
document.getElementByID('cart').style.height = 600;
document.getElementByID('cart').height = '600';
document.getElementByID('cart').style.height = '600';
document.getElementByID('cart').height = 600
document.getElementByID('cart').style.height = 600
document.getElementByID('cart').height = '600'
document.getElementByID('cart').style.height = '600'
document.cart.height = 600;
document.cart.style.height = 600;
document.cart.height = '600';
document.cart.style.height = '600';
document.cart.height = 600
document.cart.style.height = 600
document.cart.height = '600'
document.cart.style.height = '600'

Nothing seemed to work for me. Typical error message was... "Object doesn't support this property or method"

Anyone know where I am messing up? I have also tried using the .style.display = 'none', but I don't seem to be doing that right either.

Thanks.

 

dbcooper




msg:3844145
 10:09 pm on Feb 6, 2009 (gmt 0)

>guess %

93.408719%

That's overall. Search for 'browser javascript enabled' and you'll find plenty of documentation for the above guess -they just round.

Tech-related sites would probably see significantly lower, perhaps as low as in the 70-75 percentile range.

daveVk




msg:3844182
 11:32 pm on Feb 6, 2009 (gmt 0)

[msdn.microsoft.com...]

You need to read this, iframe apparently has width but NO height, plus more.

As for js percent, does anyone expect cart sites to work without it, I don't think many sites would.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved