Pop up window with Dynamic text???

Discussion in 'Web Design and Development (archive)' started by ptown, Feb 4, 2004.

  1. macrumors newbie


    I am trying to create a pop up window that contains an iframe with text (News or updated info) that can be changed by the client on a daily or weekly basis. I'm not sure if this possble or not. But if so, could someone please help me out or point me in the right direction.

  2. macrumors 603


    i can't help you with the technicals, but i would stay away from popup windows in any form, as many people are unable to view them, thanks to popup-blockers. they don't even realize they're missing something potentially important. and no one likes changing popup-blocker settings each time they visit a site...

  3. macrumors newbie


    Thanks for the reply. Does anyone else have any suggestions.
  4. macrumors 601

    Westside guy

    I don't quite understand what you mean by "changed by the client". The client program, a business client, ...?

    Regardless of that, you would need executable access to do it. JavaScript plays in a sandbox, and has no access to the filesystem.
  5. macrumors newbie



    What I mean by the client is someone other than me who can somehow email or access a webpage where they can add new text to be placed in a designated table in the html page. Without having to open up the html file and then upload the changes through a FTP site. I don't know what type of programming to use to do this, if Javascript is not the answer, then what is?
  6. macrumors 601

    Westside guy

    Any language that the server supports - Perl, C++, C, Python, Visual Basic, Ruby, etc. The whole point is you need to be able to run programs on the server to do this. Basic Web hosting won't cut it unless they offer "CGI access" as part of the package (assuming it's not a Windows host, hopefully).

    You could probably grab one of the free blogging programs and modify it to work, as long as you know how to program at least a little.
  7. macrumors 65816


    I saw a snippet of code from Microsoft that had ASP code to pull data from an XML file. I'm sure you could do the same with any other dynamic language, even JavaScript. This way you can create a form that just appends their data to the XML file.

    I'll see if I can find that code and post it, and at the very least, run asp2php to convert it.

    EDIT: Try here -- http://support.microsoft.com/default.aspx?scid=kb;en-us;315906

    I hope that helps!

  8. macrumors 601

    Westside guy

    Nope. You're missing a fundamental difference here.

    JavaScript is parsed on the CLIENT - the visitor's browser. It has no awareness of the server at all.

    Server-based languages require some level of server-executable access. ASP scripts are SERVER scripts. PHP also is server-based.

    Trust me, I do this for a living.
  9. Moderator emeritus

    Mr. Anderson

    Flash would also be able to do this.

    Although the table would have to be flash based as well. Don't know if this helps.

  10. macrumors 65816

    Laslo Panaflex

    Sure that's true, but you can have popup window linked on your site. Popup blockers don't block these windows, I think that this is what he means. Popup windows are great if used correctly, like on my websites when you click on a streaming video link, it open up a popup window the exact size of the video with no task bar and scroll bar. It makes things nice and clean. So to say that not using popup windows in any form is a bad idea is incorrect. I bet you view many "voluntary" popup windows when you are in the internet that are not blocked.
  11. macrumors newbie


    Thanks for the replies,

    I know my way around HTML, Javascript, and Flash (with limited actionscripting) but I've never worked with databases, PHP, ASP or .net . So I'm kinda in the dark. I'm very eager and quick learner. I taught myslef Flash and Dreamweaver. So Westsidew Guy if you don't mind could you so to speak, dummify a step by step on how I can execute this. I know my host allows CGI scripts and PHP and SQL. I'm using Aplus.net
  12. macrumors 65816


    I trust you... I know very little about web development. Thanks for the explanation.
  13. macrumors newbie


    Does anyone else have any other suggestions. i am trying to find a way to set up a news section for a website that i'm working on. I was wondering how I could set up some way for the client to update the text in the news section themselves without having me manaully update it everytime. Sorry if this is a really bad newbie question.
  14. macrumors 601

    Westside guy

    I'm answering your e-mail here; hope that's okay. :)

    Since you have CGI access, I am guessing your server is running on a Linux or BSD box. This means almost certainly you'll have a language called Perl available. It's pretty easy to learn; it's just a scripting language. The structure is quite different from, say, JavaScript; but it's no harder to learn. Anyway, you could just make a simple HTML form (this part doesn't need scripting) that has the field or fields you wish to allow your clients to enter. That form will have an "action" attribute; for that you will point to the perl script you will write. :D

    That Perl script should grab the input variables from the form, and use them to output the updated HTML page (since HTML is just a text language, you can script this pretty easily). For something simple like this I wouldn't bother with MySQL. Just store the input in "flat files" (basic text files).

    I would suggest, if you're trying to learn perl, that your first script should be simplified. Maybe have the input form with just a text box or something like that until you've figured it out - then worry about making it actually useable for your clients.

    A good resource is http://www.perl.com. If you don't mind spending $20 or so, I highly recommend a book from O'Relly - it's called "Learning Perl". There's also a "Programming Perl" book, but it's not as readable; plus 95% of what you'll ever want to know is in the "learning" book.

Share This Page