Wery easy, but ? look at this...

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
spamyboy
Forum Contributor
Posts: 266
Joined: Sun Nov 06, 2005 11:29 am
Location: Lithuania, vilnius

Wery easy, but ? look at this...

Post by spamyboy »

How could I make this work ?

Code: Select all

<a href="#" onclick="showDiv('targetDiv');return false; go('http://www.example.com');" target="_blank">
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

¿qué?
Image

I'd like to make a suggestion: you need to spend a bit more time explaining what you're trying to do and what you've tried in your threads. Very very few of your posts every make any sense until you've replied two or more times.

..and there's this:
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:2. Use descriptive subjects when you start a new thread. Vague titles such as "Help!", "Why?" are misleading and keep you from receiving an answer to your question.
User avatar
spamyboy
Forum Contributor
Posts: 266
Joined: Sun Nov 06, 2005 11:29 am
Location: Lithuania, vilnius

Post by spamyboy »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


sorry 
well here is alitle bit more of code:
[syntax="html"] <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td align="center"><a href="#" onclick="showDiv('targetDiv');return false; window.open('http://pleas.hostingas.in/refer.php', 'newWindow');">click here to see download links</a></td>
            </tr>
            <tr>
              <td height="2"></td>
            </tr>
            <tr>
              <td><div align="center" style="font-size:9px;">this link could lead to your website ! <a href="index.php?do=feedback">Contact us</a></div></td>
            </tr>
            <tr>
              <td height="2"></td>
            </tr>
            <tr>
              <td align="center"><div id="targetDiv" style="display:none;">hiddent text</div></td>
            </tr>
          </table>
I want to make, link that would unhide that div & open new link, they work if I use them like:

Code: Select all

<a href="#" onclick="showDiv('targetDiv');return false;>click here to see download links</a>
or

Code: Select all

<a href="#" onclick="window.open('http://pleas.hostingas.in/refer.php', 'newWindow');">click here to see download links</a>
but when I connect them

Code: Select all

<a href="#" onclick="showDiv('targetDiv');return false; window.open('http://pleas.hostingas.in/refer.php', 'newWindow');">click here to see download links</a>
they just stop to work


feyd | Please use[/syntax]

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

You see that "return false;" in the bit of Javascript there? Move it after the window.open call.
User avatar
spamyboy
Forum Contributor
Posts: 266
Joined: Sun Nov 06, 2005 11:29 am
Location: Lithuania, vilnius

Post by spamyboy »

Thank's man it realy works.
Post Reply