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 dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by hiyatran

  1. hiyatran

    Single vs Double Quotes (Very Confusing!!)

    The row in the table would highlight whenever I mouse over it. This works perfectly in HTML but I would like to convert from HTML code to Javascritp code to make it more dynamic. <html> <body> <TABLE border=1> <TR...
  2. hiyatran

    Compare 2 arrays

    I have 2 arrays and I would like to compare the 2 arrays. If an element in array 1 is NOT in array 2 then I would like to display that element. In this case, I should only display the letter "c" but it doesn't work and I don't know why?? Here's my code: <html><head> <script...
  3. hiyatran

    Calling a Function

    I would like to call a function within a function. Is this even possible?? When I do this I get "undefined" Here's my code: <html> <head> <script type="text/javascript"> function product(a,b){ total = a*b; display(total); } function display(num){ return num; } </script> </head>...
  4. hiyatran

    Passing to a Function

    How do I pass an id to a function?? Or is this even possible. <html> <head> <title> JavaScript array passing example </title> <script type="text/javascript"> function init(){ display(addText1); display(addText2); display(addText3); display(addText4); } function display(var...
  5. hiyatran

    Passing Array to Function

    I would like to pass an array to a function but how does the program know which array I would like to choose from?? Lets say I have 3 arrays and I would like to pass array C, to my function. I checked the web but they only show if you have ONLY 1 array but NOT for multiple arrays. How would I...
  6. hiyatran

    innerHTML Not Displaying

    I can't seem to get my innerHTML to display my content. This works fine, if I was to put it all in one line. document.getElementById('addedText').innerHTML = '<table><tr><td>'+"My text goes here"+'</tr></td></table>'; If I was to break it up, which I wanted then nothing seem to show up...
  7. hiyatran

    Link Disappearing

    How do I prevent my Link from disappearing?? When I click on the link, "Click Here" It display, "Look At Me!!" but the link, "Click Here" is GONE Is there a way to keep my link, "Click Here" from disappearing? So when I click on the link, "Click Here" the content, "Look At Me!!" should...
  8. hiyatran

    Display Array

    I would like to display the elements in my array but it is NOT working. Here's my code: <HTML> <HEAD> <TITLE>Test Input</TITLE> <script type="text/javascript"> function addtext() { var openURL=new Array("http://google.com","http://yahoo.com","http://www.msn.com","http://www.bing.com")...
  9. hiyatran

    Open a New Window

    this works perfectly thank you soooooooooooooo much http://snooples.com http://hotdeal.outingsforless.com
  10. hiyatran

    Open a New Window

    when a user click on a link, it would open a new window in HTML it is something like this: <a href="http://google.com" target="_blank">click here</a> How do I do this in Javascript? So a user would click on the link and it would open a new window. Here's my code document.writeln('<tr><td>' +...
  11. hiyatran

    Calling CSS in Javascript

    in HTML you can call CSS <head> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <tr><td class="cssHere">Display</td></tr> can you even call CSS in javascript? document.writeln("<tr><td class="cssHere">" + Display + "</td></tr>"); if so how do you even call the "style.css"...
  12. hiyatran

    CSS with Javascript??

    I am able to incorporate CSS into the HTML, like this: <tr><td style="background-color:#FFFF00;">test</td></tr> How can I incorporate CSS into javascript? document.writeln("<tr><td style="background-color:#FFFF00;">" + "test" + "</td></tr>"); The javascript code doesn't work or this is it even...
  13. hiyatran

    document.writeln()

    I'm sorry if this question seem very basic but I just start learning javascript. I would like to display an image but not sure why it is not working. In a nutshell, here's my code <html> <head></head> <body> <script type="text/javascript"> document.writeln("<img src=/"xMark.jpg /" width=25...
  14. hiyatran

    Can I submit multiple links at once??

    this works great tks feherke http://snooples.com http://hotdeal.outingsforless.com
  15. hiyatran

    Can I submit multiple links at once??

    I sort of got it working, here's the code: function addtext() { var openURL = new Array("google.com","yahoo.com","msn.com"); for(var i=0;i<=openURL.length;i++){ if (openURL[i].substr(0,4) != 'http'){ openURL[i] = 'http://'+openURL[i]; }...

Part and Inventory Search

Back
Top