cuemasterfl
Supreme [H]ardness
- Joined
- Jul 5, 2001
- Messages
- 4,181
Ok, consider this page:
http://www.studcow.com/newsites.php
The drop down at the bottom, where you choose the company - when you choose one it's supposed to open a new URL, which will vary upon the choice selected.
Example: If you choose Quixtar, it's supposed to redirect to http://Quixtar.maxoutnow.com, etc. Instead, you get an About:blank page.
Here's the snippet of PHP code I believe is responsible:
function URLjump() {
windowopen = window.open();
var Current = document.Companies.URL.selectedIndex;
windowopen.location.href = 'http://' + document.Companies.URL.options[Current].value;
windowopen.focus();
}
And here's the PHP code for the drop down:
<select name="URL" onChange="URLjump();">
<?
// $sql = "select c.name, m.ID, m.CompanyInfo_ID from c companies, m members where m.CompanyInfo_ID = c.id and m.Email = 'MsStud@studcow.com' order by c.name asc";
$sql="select id, name, URL from companies where url != '' order by name asc";
$result=$db->query($sql);
echo("<option value=\"\">Is your company in yet? Click on the arrow.");
while ($data=$db->fetch_object($result)){
if($data->URL==""){
$data->URL="studcow.com/whatyouget.html";
}
if ($data->name) {
echo("<option value=\"$data->URL\">$data->name");
}
}
?>
</select>
Any help would be appreciated.
http://www.studcow.com/newsites.php
The drop down at the bottom, where you choose the company - when you choose one it's supposed to open a new URL, which will vary upon the choice selected.
Example: If you choose Quixtar, it's supposed to redirect to http://Quixtar.maxoutnow.com, etc. Instead, you get an About:blank page.
Here's the snippet of PHP code I believe is responsible:
function URLjump() {
windowopen = window.open();
var Current = document.Companies.URL.selectedIndex;
windowopen.location.href = 'http://' + document.Companies.URL.options[Current].value;
windowopen.focus();
}
And here's the PHP code for the drop down:
<select name="URL" onChange="URLjump();">
<?
// $sql = "select c.name, m.ID, m.CompanyInfo_ID from c companies, m members where m.CompanyInfo_ID = c.id and m.Email = 'MsStud@studcow.com' order by c.name asc";
$sql="select id, name, URL from companies where url != '' order by name asc";
$result=$db->query($sql);
echo("<option value=\"\">Is your company in yet? Click on the arrow.");
while ($data=$db->fetch_object($result)){
if($data->URL==""){
$data->URL="studcow.com/whatyouget.html";
}
if ($data->name) {
echo("<option value=\"$data->URL\">$data->name");
}
}
?>
</select>
Any help would be appreciated.