SitePoint Sponsor |
|
User Tag List
Results 26 to 41 of 41
Thread: Popups
-
May 1, 2003, 05:25 #26
- Join Date
- Oct 2002
- Location
- Iceland
- Posts
- 1,238
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
and once again 'java script' should be javascript I belive.
wierd why vB splits it up!- website
-
May 1, 2003, 05:37 #27
- Join Date
- May 2001
- Location
- Channel Islands Girth: Footlong
- Posts
- 5,882
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by website
I swear to drunk I'm not God.
» Matt's debating is not a crime «
Hint: Don't buy a stupid dwarf ö Clicky
-
May 1, 2003, 07:17 #28
- Join Date
- Oct 2002
- Location
- Iceland
- Posts
- 1,238
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by weirdbeardmt
- website
-
May 1, 2003, 07:18 #29
- Join Date
- Jan 2003
- Posts
- 5,748
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Just a test though - in the event that [object] is due to you using a link - and this that follows will give a true/false answer if it's something to do with your link.
Instead of using a link use a button instead and have a look at the parent window to see if [object] if there or not.
If not then it's your link that's f***ed 8)
BTW - I mean the HTML button and not a FORM button 8)
-
May 1, 2003, 08:27 #30
- Join Date
- Jul 2001
- Location
- Berkshire, UK
- Posts
- 7,442
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by website
Regular user
-
May 1, 2003, 08:40 #31
- Join Date
- Oct 2002
- Location
- Iceland
- Posts
- 1,238
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
and its quite easy to get round once you know about it
its been like this since well erm.. since years ago actually- website
-
May 1, 2003, 08:43 #32
- Join Date
- Jul 2001
- Location
- Berkshire, UK
- Posts
- 7,442
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
well everytime your saw the word jav script with a space you would know that it was supposed to be one word ... its a bit like writing & n b s p ; and knowing the you ahve to include the spaces
anyway we disgress back to Dean's problem.Regular user
-
May 1, 2003, 08:44 #33
- Join Date
- Jan 2003
- Posts
- 5,748
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Visual Basic ? What do you expect from Microsoft ? LoL...
-
May 1, 2003, 09:40 #34
- Join Date
- Mar 2003
- Location
- Derbyshire, UK
- Posts
- 487
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi all, ok website here's the full script :
PHP Code:<?php
// includes
include("conf.php");
// open database connection
$connection = mysql_connect($host, $user, $pass) or die ("Unable to connect!");
// select database
mysql_select_db($db) or die ("Unable to select database!");
$ocnews = @mysql_query('SELECT ID, headline, DATE_FORMAT(date,\'%W %D %M \') AS realdate, content, author FROM ocnews ORDER BY author DESC LIMIT 5');
if (!$ocnews) {
die('<p><font color="red" size="2" face="Arial, Helvetica, sans-serif">Error retrieving news from database!</font><br />'.
'Error: ' . mysql_error() . '</p>');
}
while ($author = mysql_fetch_array($ocnews)) {
$id = $author['ID'];
$headline = ($author['headline']);
$date = $author['realdate'];
$content = ($author['content']);
$author = ($author['author']);
echo ( '<a href="article.php?id=$id" target="_blank" onclick="window.open( this.href, this.target, \'width=400, height=455\' ); return false;">
$headline</a><img src="News/images/spacer.gif"width="10" height="4" border="0">$date<br>');
}
?>
http://www.ops-centre.co.uk/squadron...headlines3.php
If i change the " to ' then I lose the new window format IE no scrolbars etc.
cheers Deano
-
May 1, 2003, 10:03 #35
- Join Date
- Jul 2001
- Location
- Berkshire, UK
- Posts
- 7,442
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
Um have you tried it with " not ' (double quotes in single quotes) as I thought php only parsed values with double quotes?
PHP Code:echo ( "<a href=\"article.php?id=".$id."\" target=\"_blank\" onclick=\"window.open( this.href, this.target, \"width=400, height=455\" ); return false;\">".$headline."</a><img src=\"News/images/spacer.gif\" width=\"10\" height=\"4\" border=\"0\">".$date."<br>");
}
Regular user
-
May 1, 2003, 10:04 #36
- Join Date
- Jul 2001
- Location
- Berkshire, UK
- Posts
- 7,442
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
quick test it works for me - obviously I am not using your sql query but putting in a set $id=14 just before it and it works just fine?!?
Regular user
-
May 1, 2003, 10:16 #37
- Join Date
- Mar 2003
- Location
- Derbyshire, UK
- Posts
- 487
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
thx sarah !
I'll try to add the new window formating now IE noresize etc
Best Regards
Deano
-
May 1, 2003, 10:31 #38
- Join Date
- Mar 2003
- Location
- Derbyshire, UK
- Posts
- 487
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Well the script finally works as required, here's the echo just incase someone else is having a simular problem,
PHP Code:echo ( "<a href=\"article.php?id=".$id."\" target=\"_blank\" onclick=\"window.open( this.href, this.target, 'width=400, height=455, status=no,scrolling=no,resizable=no,scrollbars=no' ); return false;\">".$headline."</a><img src=\"News/images/spacer.gif\" width=\"10\" height=\"4\" border=\"0\">".$date."<br>" );
www.ops-centre.co.uk/squadron/News/headlines.php
Thx for all your help folks !
Best Regards
Deano !Last edited by Deano; May 1, 2003 at 11:00.
-
May 1, 2003, 12:11 #39
- Join Date
- Jan 2003
- Posts
- 5,748
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Ok, but another issue that you'll need to address is that every time you click on a link the news opens up in a new window.
I clicked over all 3 and I had 3 windows 8)
What you'd need to do is give your window a name and check for this first before you open a new window.
You might want to look at www.javascriptsource.com for more on pop up windows ?
Just a thought nothing more 8)
-
May 3, 2003, 00:42 #40
- Join Date
- Mar 2003
- Location
- Derbyshire, UK
- Posts
- 487
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thx Dr
If you wouldnt have pointed this out i would never have noticed.
I will look into this and post the finalised script again
Best Regards
Deano
-
May 3, 2003, 03:37 #41
- Join Date
- Jan 2003
- Posts
- 5,748
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hope this helps ?
PHP Code:What happens if we execute the window.open() method twice, with the same sName argument? Like HTML-generated windows, if you specify the name of a window that already exists, open() simply uses that existing window rather than opening a new one. Take a look at the following script:
window.open("[url=http://www.javascript.com/]http://www.javascript.com/[/url]", "win");
window.open("[url=http://www.docjs.com/]http://www.docjs.com/[/url]", "win");
If you execute these statements, the browser opens a new window named "win" to display the [url=http://www.javascript.com]www.javascript.com[/url] page. But the second statement then replaces the URL of the new window with [url=http://www.docjs.com]www.docjs.com[/url]. The following statements generate two different windows to display these Web sites:
window.open("[url=http://www.javascript.com/]http://www.javascript.com/[/url]", "win1");
window.open("[url=http://www.docjs.com/]http://www.docjs.com/[/url]", "win2");
Go ahead and run these statements. The browser opens two new windows. The first one, named "win1", loads the URL [url=http://www.javascript.com]www.javascript.com[/url], while the other window, named "win2", loads the URL [url=http://www.docjs.com]www.docjs.com[/url]. Note that [url=http://www.docjs.com]www.docjs.com[/url] is the same as [url=http://www.webreference.com/js]www.webreference.com/js[/url].
If we don't specify a name for the new window, the browser automatically launches a new window. The same applies to the name "_blank", but an empty string is another story. There are several important differences between Internet Explorer and Navigator:
Bookmarks