[SOLVED] How to make the PM pop up box?

This is a discussion on "[SOLVED] How to make the PM pop up box?" within the JavaScript Forum section. This forum, and the thread "[SOLVED] How to make the PM pop up box? are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices




Reply
 
LinkBack Thread Tools
  #21  
Old Nov 6th, 2007, 08:49
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,612
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: How to make the PM pop up box?

Ok, I'll come back to you tomorrow.. Thanks..
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #22  
Old Nov 7th, 2007, 01:00
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,612
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: How to make the PM pop up box?

Hai Rakuli.. Guess what? I did not have enough sleep yesterday night doing the ASP-JS thing!

Actually I am not very clear what to do! I have some "rough time" with this code, could you give me a brain wash!?
HTML: Select all
<html>
<head>
<title>Randomly Chosen</title>
<script type="text/javascript">
<%
/* ASP logic here that will print either 'var showPmpopup = false;' or 'var showPmpopup = true' */
%>
</script>
</head>
My current code is this:
HTML: Select all
<%response.write ("<SCRIPT type=text/javascript>")%>
    
    If (<%=cp("myMessageElert")%> = NEW)
    {
        <%response.write ("var showPMpopup = true;")%>
    }
    Else
    {
        <%response.write ("var showPMpopup = false;")%>
    }
<%response.write ("</SCRIPT>")%>
if I run them, there will be an js error that i can see from my developer tool but when i see the source code of the page, it is like this:
HTML: Select all
<SCRIPT type=text/javascript>
    
If (NEW = NEW)
{
   var showPMpopup = true;
}
Else
{
   var showPMpopup = false;
}
</SCRIPT>

</head>
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)

Last edited by Monie; Nov 7th, 2007 at 01:07.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #23  
Old Nov 7th, 2007, 04:45
Rakuli's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Australia
Age: 24
Posts: 956
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to make the PM pop up box?

Okay, so you're going wrong with the fact that IF and ELSE shouldn't actually appear on the page...

After the ASP work is done, the source code for this part should read

<script type="text/javascript">
var showPMpopup = true;
</script>

or

<script type="text/javascript">
var showPMpopup = false;
</script>

So in ASP you would ask

Does this asp variable hold a value of true ?

If yes, write the fist thing to the page, if not write the other...

Cheers,
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #24  
Old Nov 7th, 2007, 05:06
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,612
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: How to make the PM pop up box?

Ooooo......!!
So how do I hide the IF ELSE part from being display?
Hemmm...!!!
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #25  
Old Nov 7th, 2007, 05:12
Rakuli's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Australia
Age: 24
Posts: 956
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to make the PM pop up box?

Well it appears that this part of you ASP code is just going straight to the page...

From my limited ASP knowledge

PHP: Select all

<script type="text/javascript">

<%
If 
myMessageElert "NEW" Then
    Response
.Write("var showPMpopup = true;")
Else
    
Response.Write("var showPMpopup = false;")
End If
%>
</script> 
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #26  
Old Nov 7th, 2007, 05:35
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,612
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: How to make the PM pop up box?

Ok, I manage to settle that. this is what my page looks like after running the ASP-JS code:

HTML: Select all
<SCRIPT type=text/javascript>var showPMpopup = true;</SCRIPT>
and I have tested to change the myMessageElert = "READ"and the code works fine detecting the value if it is "NEW" or other than that!

Here is the new problem: IF is not define!

Code: Select all
<body>

<script type="text/javascript">
// Place this just below the <body> tag
If (showPMpopup)
{
    document.write('<div style="width:300px;height:150px;border:solid 1px #000000;background-color:blue;position:absolute;top:-155px;left:100px;" id="PMpopup">PM Stuff here, you could write me without javascript or write me with ASP... this is as an example....</div>');
    // now to animate the popup
    // set some variables
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #27  
Old Nov 7th, 2007, 05:37
Rakuli's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Australia
Age: 24
Posts: 956
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to make the PM pop up box?

take the capitalisation away from If...

Pretty much just copy my entire post from above ^ -- there is no need to change anything in that code
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #28  
Old Nov 7th, 2007, 05:41
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,612
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: How to make the PM pop up box?

Here is a +rep point for you Rakuli!

Nicely done! You are the great!
Nicely flow down my page cool page.. got some positioning problem tho, but I can fix it in no time!

Thanks Rakuli

EDIT: Ooopsss... I have to spread some rep to other people first in order to spread some to you! You just hold on there!
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #29  
Old Nov 7th, 2007, 06:15
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,612
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: [SOLVED] How to make the PM pop up box?

Hai Rakuli, just one final question!

I tried posting new message, but the sliding thing won't come out?
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #30  
Old Nov 7th, 2007, 08:04
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,612
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: [SOLVED] How to make the PM pop up box?

Solved it, It's just my SQL statement! Thanks..
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #31  
Old Nov 7th, 2007, 08:24
Rakuli's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Australia
Age: 24
Posts: 956
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: [SOLVED] How to make the PM pop up box?

Great! Told you it was easy

** Rakuli awaits Rep but does not worry too much as Monie's elation is all he needs..**
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #32  
Old Nov 7th, 2007, 08:38
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,612
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: [SOLVED] How to make the PM pop up box?

**monie try as hard as he can in order to spread some reputation point around, but couldn't find any.. He pointed his mouse to his own rep button to see if that can do the trick
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to make an expand / collapse menu sing2trees JavaScript Forum 4 Apr 14th, 2008 12:16
[SOLVED] Problems with CSS 'Header Image' - How to make fluid?? slimboyfatz32 Web Page Design 5 Jan 28th, 2008 09:09
[SOLVED] How to make a div a link R8515198 Web Page Design 4 Nov 30th, 2007 08:25
[SOLVED] joining 2 queries together to make 1 query AdRock Databases 0 Nov 18th, 2007 21:37
[SOLVED] How do I Make Content available for download chrissmith Starting Out 4 Nov 11th, 2007 10:13


All times are GMT. The time now is 00:39.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42