On Sun, Oct 10, 2010 at 6:42 AM, ionlupascu <[email protected]> wrote:
> If you look by this address: > http://www.w3schools.com/tags/tag_script.asp > the corrected html code should be: > ------------------------------------------------------------------------- > <html> > <body onload="changeIt();"> > <head> > <script langauge="javascript"> > function changeIt(){ > var width=50; > var height=50; > document.image.width=width > document.image.height=height > } > > </script> > <script langauge="javascript" src="external.js"/> > </head> > <img src="aa.jpg" name="image" onclick="changeeIt1();"> > </body> > </html> > ------------------------------------------------------------------------- > and external.js file: > ------------------------------------------------------------------------- > var count=1; > function changeeIt1(){ > if(count==2){ > var amrit1=50 > var pal=50 > document.image.width=amrit1 > document.image.height=pal > count=1; > }else{ > var width=500 > var height=500 > document.image.width=width > document.image.height=height > count=2; > } > } > ------------------------------------------------------------------------- > > Hope if this helps you. > > On Oct 10, 10:22 am, amrit pal pathak <[email protected]> > wrote: > > i have two file > > 1)Html=which has html code.. > > 2).js file which has 2 functions > > > > Problem);;i want when i click the image , .js file(its fucntions) > > should be called and image should be resized according to the code.. > > But what i am doing ,it is not being doing > > > > 1)contents of html file is as under > > > > <html> > > <body> > > > > <body onload="changeIt();"> > > <head> > > > > <script langauge="javascript"> > > > > function changeIt() > > { > > > > var width=50; > > var height=50; > > document.image.width=width > > document.image.height=height > > > > } > > > > </script> > > </head> > > > > <img src="/home/administrator/Desktop/aa.jpeg" name="image" > > onclick=src="/var/www/external.js/changeeIt();"> > > > > </body> > > </html> > > > > 2)Content of .js file is as under > > > > function changeeIt() > > > > { > > if(count==1) > > { > > var width=500 > > var height=500 > > document.image.width=width > > document.image.height=height > > count=2;} > > > > else if(count==2) > > { > > var amrit1=50 > > var pal=50 > > document.image.width=amrit1 > > document.image.height=pal > > count=1; > > > > } > > } > > > > Please somebody help > > > > Thanks in advance > > -- > v8-users mailing list > [email protected] > http://groups.google.com/group/v8-users This is not working ,i follwed the same as it is... even now image is not showing.. i want to call function changeeIt() when image is clicked Help Thanx -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
