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

how to open page that has query string AND target _blank 3

Status
Not open for further replies.

Trusts

Programmer
Feb 23, 2005
268
0
0
US

Hi all,

I need to open a "new window" to display the large graphic. The action takes place when a link "click for large picture" is clicked.


><A HRef='large_pix.php?SKU=" . $row[10] . " . " target='_blank'>Click for large picture</A>


The problem is that the '_blank' gets included as part of the query string instead of doing what it is supposed to.

Any ideas?

Thanks,
KB
 
Looks like you have something wrong with the " and ' marks. You don't have an open/close quote for each set. Should the third double quote be a single quote?
 
as roadcone20 says
Code:
echo "<A HRef='large_pix.php?SKU=[red]$row[10][/red][red]'[/red] target='_blank'>Click for large picture</A>";
 
Or, since HTML attributes are canonically surrounded by doublequotes....

Code:
echo '<A HRef="large_pix.php?SKU=' . $row[10] . '" target="_blank">Click for large picture</A>';

or

Code:
print <<< EOHTML
<A HRef="large_pix.php?SKU={$row[10]}" target="_blank">Click for large picture</A>
EOHTML;



Want the best answers? Ask the best questions! TANSTAAFL!
 
HTML attributes are canonically surrounded by doublequotes

i'd always thought that too but was firmly told a few months back that attributes must be enquoted but that there is no rule on either type of quote.

i must admit that i have not found anything definitive one way or another apart from a statement made in w3schools ( Do you have a more authoritative reference that supports your argument?
 
Thanks everyone - it's working now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top