Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 48

Thread: My Box

  1. #21
    Join Date
    Jun 2007
    Posts
    64
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    hey there i played around with your script, but it seems to have a problem in combination with ajax..
    i mean i have a ajax driven page (dynamic content)..

    and i wanted to use your script in a "included" page which is called dynamically by ajax...
    but the code doesnt work there..

    i also tried to write the code manually in the page, instead of calling the css&javascript from other locations..
    both ways didnt worked..


    is there any other good script, which does the same thing .. i need it for image displaying.. thx!

  2. #22
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by kobo1d View Post
    hey there i played around with your script, but it seems to have a problem in combination with ajax..
    i mean i have a ajax driven page (dynamic content)..

    and i wanted to use your script in a "included" page which is called dynamically by ajax...
    but the code doesnt work there..

    i also tried to write the code manually in the page, instead of calling the css&javascript from other locations..
    both ways didnt worked..


    is there any other good script, which does the same thing .. i need it for image displaying.. thx!
    Actually, any script of this sort would have to be initialized to the Ajax added content at some point if it is meant to work with it. Also, any script of this sort would need to be prevented from initializing the same added content a second time (or least not fully a second time, if you catch my drift). I've worked this out with at least one other script, but I'm not certain if I have the time to go into the details as it would apply here at this time. For one thing My Box is still under development, so the final version's way of doing this may be different than the current version, which in my opinion still needs work.

    One way would be to initialize all possible added content as the page loads by having hidden links that duplicate what is wanted on the added page(s). Once these are initialized on page load, when the Ajax added content arrives, it could use the:

    Code:
    return mybox.show(#);
    and the:

    Code:
    return mybox.show('url', 'optional_caption');
    methods mentioned on the demo page.
    Last edited by jscheuer1; 07-20-2007 at 02:26 PM. Reason: conform to strict syntax
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #23
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    No fancy effects?
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  4. #24
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Code:
    return mybox.show(#)
    Error!
    Code:
    return mybox.show('#');
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #25
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by tech_support View Post
    No fancy effects?
    That really depends upon what you mean by fancy, though I can easily guess. I previously mentioned in this admittedly long thread that this was intentional. My intention being to keep the script lightweight:

    I didn't want to load it up with special (ala scriptaculous or mootools) effects though.
    Quote Originally Posted by Twey View Post
    Code:
    return mybox.show(#)
    Error!
    Code:
    return mybox.show('#');
    Not in the context of an onclick event, no. There it is a preference, but I normally would have just thrown it in anyway (must have been in a rush, or tired) and will go back now and add it.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #26
    Join Date
    Feb 2007
    Location
    Earth
    Posts
    133
    Thanks
    6
    Thanked 1 Time in 1 Post

    Default

    very nice, i enjoyed the box video
    http://www.insanecombat.com << bored? check out ma game

  7. #27
    Join Date
    Jun 2007
    Posts
    64
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    One way would be to initialize all possible added content as the page loads by having hidden links that duplicate what is wanted on the added page(s). Once these are initialized on page load, when the Ajax added content arrives, it could use the:
    Code:
    return mybox.show(#);
    and the:
    Code:
    return mybox.show('url', 'optional_caption');
    methods mentioned on the demo page.
    edit: ok i checked it now..

    i need it to display a single image, not a box.
    so i tried it with following line ->

    Code:
    <a href="#" rel="img" rev="Back Cover" title="#bkL_002 Back-Cover" onclick="return mybox.show('bkl_002_back.jpg', 'Back Cover');">Back</a> Picture
    when i click the link, the box opens, but instead of an image, i get alot of code displayed..
    like when i open a image with notepad..

    any ideas ?


    SIDE NOTE: i noticed another problem with the script... it doesnt overlay flash movies and some dhtml..
    my flash header shines trough the gray overlay and my dhtml side-menu also does not get hidden...
    Last edited by kobo1d; 07-20-2007 at 04:33 PM.

  8. #28
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Not in the context of an onclick event, no.
    Huh? # isn't a valid identifier; there's no way it can fail to throw an error, as far as I'm aware.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  9. #29
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Twey View Post
    Huh? # isn't a valid identifier; there's no way it can fail to throw an error, as far as I'm aware.
    See the demo page. # is a stand in for the number representing the content. I did refer to the demo page in my post where that appeared, and that did not appear to be what you were complaining about, if I misunderstood, my apologies.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  10. #30
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    Changed to:

    Code:
    var mybox = {
    from:

    Code:
    mybox = {
    That's what you meant, right?
    Yes, exactly.

    Quote Originally Posted by Twey View Post
    Actually, I seem to recall reading somewhere that new Function() compiled the string again every time the function is executed.
    I can't imagine why as the function body is represented by an immutable string.
    Mike

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
  •