Dev
Dev

Reputation: 479

Button doesn't work in ie

I have given link to button like this..It works fine on mozilla & chrome But It does not work on ie9,ie8 & ie7 .......

 <a href="view_package_details.php?holiday_id=<?php echo $row['holiday_id']; ?>">  <input name="" type="button" class="view-details-btn-input" /> </a>

I have put button like this..It works fine on mozilla & chrome & ie9 But It does not work on ie8 & ie7 .......

Can anyone suggect me regarding this....

thanks

Upvotes: 0

Views: 937

Answers (3)

mukund
mukund

Reputation: 2423

You wont be able to use button inside hyperlink. user javascript window.location on onclick eventof button

Upvotes: 1

Muhammad
Muhammad

Reputation: 3250

if you want to use input type and href then try this.

 <input name="" type="button" class="view-details-btn-input" onclick="window.location='view_package_details.php?holiday_id=<?php echo $row['holiday_id']; ?>'" />

Upvotes: 2

Patriks
Patriks

Reputation: 1012

why are you doing that?

you can do something like this

<button onclick="window.location=view_package_details.php?holiday_id=<?php echo $row['holiday_id']; ?>;"/>

otherwise @Gareth Cornish is right, why not apply css to a tag to make it look like a button?

Upvotes: 3

Related Questions