Networking | Hardware | Software | Multimedia | System | Unix&Linux | MBA

Home>>Hardware>>I want to Resize frames on a button click

I want to Resize frames on a button click

Var_javaMasta
10-12-2005, 04:54 PM
I tried this:

<INPUT TYPE="button" VALUE="Viewer" onClick="parent.setAttribute('cols', '963,*')">

and it's just not working.... what am i doing wrong? or are there any other methods that will work?

_Aerospace_Eng_
10-12-2005, 05:26 PM
Try
<INPUT TYPE="button" VALUE="Viewer" onClick="parent.document.getElementById('theframe').cols='963,*'">
Give the frameset that you want to control an id="theframe"

Var_javaMasta
10-12-2005, 05:43 PM
thankx sooo much... it worked

Pyth007
10-13-2005, 07:49 PM
FYI for others that may experience this problem... I found out that IE doesn't like setAttribute() to reset an existing attribute (or to set an attribute that IE defines by default (such as 'id'!). I had a similar problem when I was creating elements using DOM and trying to setAttribute('id', 'newIdName') and devised a work-around function to handle this situation:

function attributeSet(elem, attrb, setting)
{
var elemAttrb = elem.getAttributeNode(attrb);
if (elemAttrb)
{
elemAttrb.value=setting;
} else {
elem.setAttribute(attrb, setting);
}
}


 

TOP

For more info

setting a minimum size
Auto Preview of Image 
Refresh with a query s
JS Validation obsolete
Javascript Pop up func
Slide show transitions
I'm a newbie...please!
how to write coding in
Advanced Debug Info 
.js file doesn't work 

News Archive

Adding Graphic To Text
re-direct form after s
pop up window controls
Clock on homepage - He
passing a param from a
Password Procection wi
document.title in same
focus onload 
Counting Wrong from Ri
Help needed on how to 

Related stories:

validate using ONSUBMIT vs ONUNLOAD
data from forms
Cross-Browser Menu Now Working, BUT Now Have FireFox Refresh Loop
How do you write maintainable code?
How to excecute 2 different form validation Java scrpt with 1 submit button ?
Need Cross-Browser Capable Menu / Script - event.srcElement to getElementById
Simply splitting a date up?
Link Extractor Mod to Get Page Domains

Copyright@2004-2005 www.zzcoke.com All Right Reserved

advanced web statistics