SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Not Bad, eh? Justin Sampson's Avatar
    Join Date
    Aug 2000
    Location
    N.S., Canada
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey,
    I'm working on my message board but I can't get this to work I want a user to be able to click a link and a window pop up with a list of smilies and when you click on one it ads it to the post. The problem is I can't get the code to work in a pop-up, I don't even know if it's possible. Heres the code I have so far:

    Code:
    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
    function View(form) {
    msg=open("","DisplayWindow","status=1,scrollbars=1");
    msg.document.write(form.Text2.value);
    }
    function Generate(form) {
    var txt=""+form.Name.value+"\r\n";
    txt+=
    ""+form.Name.value+"\r\n";
    txt+="\r\n";
    if(form.Text1.value)    
    txt+=form.Text1.value+"\r\n";
    if(form.EMail.value)
    txt+="";
    form.Text2.value=txt;
    }
    function AddText(form, Action){
    var AddTxt="";
    var txt="";
    
    
    if(Action==1) AddTxt=":confused:";
    
    
    form.body.value+=AddTxt;
    }
    function ResetPage(form) {
    if(confirm("Reset the page?")) { 
    form.body.value="";    
    
    
       }
    }
    
    // End -->
    </SCRIPT>  
    
    <input type="button" value="Confused Smiley" onClick="AddText(this.form,1);">
    Thanks,
    Justin Sampson

  2. #2
    Not Bad, eh? Justin Sampson's Avatar
    Join Date
    Aug 2000
    Location
    N.S., Canada
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh I got it I just had to make it a text link with target=mainframe. That works great with frames but I don't have frames.

    What would A normal page with no frames target name be?

    That's hard to explain so I hope you know what I mean

    Thanks again,
    Justin Sampson

  3. #3
    Irritability Defined
    Join Date
    Jul 2000
    Location
    80,000 feet below the surface
    Posts
    1,442
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    TARGET="_parent" or "_top" (more likely the latter of the two)
    My 2 Cents (or is that 2.2 Cents including GST?)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •