Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Create javascript popup window

Create javascript popup window

Scheduled Pinned Locked Moved Web Development
javascripthtmldesigntoolshelp
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dcode25
    wrote on last edited by
    #1

    Hello ! i'm new to web design and i have this problem : i'm creating a web site in dreamweaver cs3 (simple html).one of my pages have some article titles Title 1 Tilte 2 ........ i want to do this : When a user click on the title , to open a popup window without title bar that cointains one image , a description and a close button.But the image and the text should be variables to be used for all articles. Can someone give me a script in javascript for this situation ? Thank you in advance !

    A 1 Reply Last reply
    0
    • D dcode25

      Hello ! i'm new to web design and i have this problem : i'm creating a web site in dreamweaver cs3 (simple html).one of my pages have some article titles Title 1 Tilte 2 ........ i want to do this : When a user click on the title , to open a popup window without title bar that cointains one image , a description and a close button.But the image and the text should be variables to be used for all articles. Can someone give me a script in javascript for this situation ? Thank you in advance !

      A Offline
      A Offline
      Abhishek Sur
      wrote on last edited by
      #2

      Just without doing window.open for which you cant hide title bar, use a floating div to create the popup.

      var x = document.createElement('div');
      x.style.position = 'absolute';
      x.style.top='100px';
      x.style.left = '300px';
      document.appendChild(x);

      Set appropriate content and also review the position according to your requirement. :cool::cool:

      Abhishek Sur


      My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB

      **Don't forget to click "Good Answer" if you like to.

      D 1 Reply Last reply
      0
      • A Abhishek Sur

        Just without doing window.open for which you cant hide title bar, use a floating div to create the popup.

        var x = document.createElement('div');
        x.style.position = 'absolute';
        x.style.top='100px';
        x.style.left = '300px';
        document.appendChild(x);

        Set appropriate content and also review the position according to your requirement. :cool::cool:

        Abhishek Sur


        My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB

        **Don't forget to click "Good Answer" if you like to.

        D Offline
        D Offline
        dcode25
        wrote on last edited by
        #3

        thank you but i want 2 object inside popup to be variables 1 image and 1 text description , so when i click the first article the popup should show the first image and the first description , when i click the second article the popup should show the second image and description .... . is possible to do that ? thank you.

        A 1 Reply Last reply
        0
        • D dcode25

          thank you but i want 2 object inside popup to be variables 1 image and 1 text description , so when i click the first article the popup should show the first image and the first description , when i click the second article the popup should show the second image and description .... . is possible to do that ? thank you.

          A Offline
          A Offline
          Abhishek Sur
          wrote on last edited by
          #4

          Create an img element and appendChild to the Div. Or just assign the innerHTML to the div you have created inside the popup. You can change innerHTML also when required. :thumbsup:

          Abhishek Sur


          My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB

          **Don't forget to click "Good Answer" if you like to.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups