Jump to content

MrAdam

Members
  • Posts

    489
  • Joined

  • Last visited

Everything posted by MrAdam

  1. that doesn't work for me ^ .. here what i have: function launchImage() { var url = document.fullimage.src; var contents = '<html><body style="margin:0px;"><img src="'+url+'" /></body></html>'; imagewindow = window.open(url,'imagelaunch','scrollbars=no,resizable=no,toolbar=no,location=no,status=yes,menubar=no'); imagewindow.document.write(contents); } but that doesn't work :S
  2. oh dont worry, i done it
  3. Hey all. Can anybody see any errors in this script? <script type="text/javascript">function loadGallery(totalimages) { var galleryimage = new Array; galleryimage[1] = "images/gallery/image1.gif"; galleryimage[2] = "images/gallery/image2.gif"; galleryimage[3] = "images/gallery/image3.gif"; galleryimage[4] = "images/gallery/image4.gif"; galleryimage[5] = "images/gallery/image5.gif"; var imagecaption = new Array; imagecaption[1] = "camera man - say cheese!"; imagecaption[2] = "cartoon models"; imagecaption[3] = "1337 Crew Pose!"; imagecaption[4] = "noob box"; imagecaption[5] = "maoam and his cars!"; var imageload = new Array; var x = "1"; while(x<=totalimages) { imageload[x] = new Image; imageload[x].src = galleryimage[x]; x++; } var x = "1"; document.display1.src = galleryimage[1]; document.display2.src = galleryimage[2]; document.display3.src = galleryimage[3]; document.display4.src = galleryimage[4]; caption.innerHTML = imagecaption[1];} </script> When i try to run it, im being told an object is expected where i have: <body onLoad="javascript:loadGallery('5');"> anybody able to help? - Thanks!
  4. Hi people. Im fairly new to javascript. I'm writing a script, could someone please write me a function to return the mouse co-ordinates and store them in 2 variables. So it would go like this:- someone runs the function- the x co-ordinate saved in a variable called "x-co"- the y co-ordinate saved in a variable called "y-co"Thanks alot if you can help..
  5. ahh right, k. thanks anywho..
  6. Hey all!Im trying to create a scirpt that will very simply create a file on a different subdomain.Im running the scirpt on: www.newbiestyle.co.ukAnd wanting to create the file at: www.store01.newbiestyle.co.ukSo far I have: $file_name = "http://www.store01.newbiestyle.co.uk/flash/test.txt"; // Will vary!$handle = fopen($file_name, 'w') or die("Couldn't create file!");fclose($handle); I ran Windows FTP, right clicked the folder "flash" > "properties" > Set the permissions to as 'little' as possibile, checking all the boxes.However when I run the scirpt I'm getting:Warning: fopen(http://www.store01.newbiestyle.co.uk/flash/-214748364813040602130201.swf): failed to open stream: HTTP wrapper does not support writeable connections. in /home/fhlinux218/n/newbiestyle.co.uk/user/htdocs/flash/submit.php on line 77Couldn't create file!Anybody have any ideas how I can get round this?-Thankyou!
  7. ahh! I didnt realise the statement was case-sensitive - unlike PHP. Thanks.
  8. MrAdam

    div innerHTML

    1 last thing... should this work: function changeContent() { var section = document.navMenu.view.value; If (section == "alpha") { side.innerHTML="testing!"; // OR document.getElementById("side").innerHTML = "testing!"; }} cos it aint... lol .. says there's an error..
  9. MrAdam

    div innerHTML

    god im gunna cry! working now :S
  10. MrAdam

    div innerHTML

    its not. here's the url i have it on..http://www.newbiestyle.co.uk/editors/html/
  11. still not getting my yay tho :S
  12. well i been having a lot of javascript problems since i started learning.. and they come about when i start using if statements. for example i made this. i have no clue whats wrong here but it wont work :S <script type="text/javascript">function test() {var test = alpha; If (test == "alpha") { document.write("YAY!"); }}</script> very simple.. yet it wont work :S
  13. MrAdam

    div innerHTML

    still wont work :S
  14. that's really confusing.. perhaps creating a set of replace statements would be easier.. for example: <script type="text/javascript">var x = "(bluetext)This is blue text!(/bluetext)";var x = x.replace('(bluetext)','<font color="blue">');var x = x.replace('(/bluetext)','</font>');document.write(x);</script> very simple right now.. but with a bit of work you could make it work..try it: http://www.w3schools.com/js/tryit.asp?filename=tryjs_text
  15. Hi everyone.Im trying to create a javascript to edit the innerHMTL of a div. this is what I have for the javascript so far: <script type="text/javascript">function changeContent() { var section = document.navMenu.view.value; document.side.innerHTML="testing!";}</script> and here is my HTML: <form name="navMenu"> <select name="view"> <option value="alpha">Alphabetically</option> <option value="category">By Category</option> <option value="common">Most Common</option> <option value="search">By Search</option> </select> <input type="button" value="Go" onClick="changeContent();" /></form> And finally my div: <div id="side"> blah blah</div> But this doesnt work... any help? wb help much appreicated!
  16. MrAdam

    Changing IMG src

    Ahh thanks! .. sorry, im still new to XML, learning the terms.. ill giv it a try .. thanks!
  17. MrAdam

    Changing IMG src

    Hey guys! ... im new to XML and learning the basics.Is it possibile to create an XML feed to change an img src for each section. Im making a members section for a website using an XML feed (so it's easier for the admin to edit) .. except i want an image for each member... so i would like to ideally change the src of the image depending upon an XML tag like:<imgsrc>images/image.jpg</imgsrc>How could i achieve this in XSL ? .. hope this made sense..Thanks alot! Adam Boxall
×
×
  • Create New...