Jump to content

AA_Haider

New Members
  • Posts

    6
  • Joined

  • Last visited

AA_Haider's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. down arrow key is pressed.I want when down arrow key is pressed then the function searchoption() can't calling. can here is any thing which can do that.
  2. I did not understand what are you saying here is a code. <html> <script type="text/javascript"> function searchoption(){ var skw = document.getElementById("searchBar").value; if(window.XMLHttpRequest){ xmlhttp = new XMLHttpRequest; }else{ xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function () { if(xmlhttp.readyState==4 && xmlhttp.status==200){ document.getElementById("sop").innerHTML = xmlhttp.responseText; } } xmlhttp.open("GET","searchopt.php?skw="+skw,true); xmlhttp.send(); } </script> <head> </head> <body> <input type="text" id="searchBar" onkeyup="searchoption()" list="sop" /> <datalist id="sop"> </datalist> </body> </html> please heeeeeelp me.
  3. here is a url http://testmywebsite.hostzi.com/htmldatalist.html please open it and write "do" you can see related result now pres down arrow key and wait a sec you can see it will disappeare.i know why this appear i am using "onkeyup" event for this when you press down arrow key the function will refresh. you will be able to see the code from page view source. like google when you enter and word it will give you a list related to it. i want to make my datalist like that.
  4. I have a search bar attached with html datalist.html datalist updated with php file. when any word is typed it show the related result like as google when you enter any keyword it show the datalist related to this word and you can easily select any vaule for pressing DOWN ARROW KEY but in my search bar when any keyword is enter is show result like google but when press DOWN ARROW KEY it will not select any value because I m using onkeyup javascript event so when you press DOWN ARROW KEY it is also a key and due to onkeyup event datalist show again due to this reason any value does not select. what did I do,can i cannot use onkeyup event if not then what event I use.
  5. I have a these regex and I am using preg_match function /(<p[^>]*>.*?<\/p>)/m but this is not working I did not know why But if paragraphs are a single line form then it will work fine. I need it for multiply lines.
  6. I had a multiple line text I want to get only first paragraph.like ......................................… <p>this is a paragraph number 1</p> <p>this is a paragraph number 2</p> ......................................… I want get only .................................. this is a paragraph number 1 ................................ How can I do that with RegExp. Please tell me.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.