hello guys, this is the php view of this page. andalustaibah.com/mofa/index.php i hav point out the area which is not working. if selecting name entered "khalid" in search field and searched.. then it come View button. i like to open this view button in New window. can any one help please..
target="_blank" is used for <a> tag not for input. If you want to open url using input (why would you even want to do that?) use javascript on click function add this to your code: onClick="window.open(url,'_blank');" Code (markup):
you mean to say i should replace this code target='_blank' /> with onClick="window.open(url,'_blank');" if anything missing do tell me .. thanks for your help
yeah. I haven't tested it out because I haven't seen anyone use it quite like that. Here's a working example: http://jsfiddle.net/RV9dJ/
my friend you are right . but the thing is that echo " <form method='post' action='js/$rfile'> Passport ID: <b>$rid</b><br/> Voucher ID: <b>$rvid</b><br/> Name: <b>$rname</b><br/> Upload Date: <b>$rdate</b><br/> Arrival Date: <b>$radate</b><br/> Departure Date: <b>$rddate</b><br/> Check In Makkah (1): <b>$rcimak1</b><br/> Check Out Makkah (1): <b>$rcomak1</b><br/> Check In Madinah (1): <b>$rcimad1</b><br/> Check Out Madinah (1): <b>$rcomad1</b><br/> Check In Makkah (2): <b>$rcimak2</b><br/> Check Out Makkah (2): <b>$rcomak2</b><br/> Check In Madinah (2): <b>$rcimad2</b><br/> Check Out Madinah (2): <b>$rcomad2</b><br/> <input name='submit' type='submit' class='formbutton' id='submit' value='VIEW' onClick="window.open('url','_blank');"></input> <br/> <br/> <br/> </form> Code (markup): this gave error: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/cricketz/public_html/andalustaibah.com/mofa/index.php on line 218 If you fully understood my question, then also know that the new window which wil be opened it should be that pdf file which is opening in same window, i like to open that file in new window. come on do once more and understand first what i need to be done. go to this page. andalustaibah.com/mofa/index.php select name and write Khalid press search button. and there you see VIEW button. click VIEW button loads http://andalustaibah.com/mofa/js/fb1eecc202dbf936476c2b8f6e16b466.pdf in same window. it is a problem here and i want that clicking VIEW should open a new window in which that document of pdf opened.. I hope you understand this time.
@ntmedia is right. you should remove target="_blank" code from input tag. He also told an alternate method that works. cheers!
He's quite correct. Target attribute is only for anchor tag.<a>. So you should have removed that from input tag. There you go...
ansari & hussain please read what i found when i did as ntmedia instructed. my work is still in complete. i like that view button is opened in a new window. any other successful alternative.