Welcome to TalkGraphics.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2013
    Location
    Florida
    Posts
    21

    Default Adding <body onload= parameters in Web Designer MX 8?

    Ok.... one last question (LOL) The "Advanced Comment System" I'm trying to use requires that a <body onload= event take place immediately upon page loading. Xara WD MX8 obviously adds it's own body tags during creation, but no matter what I've tried (website BODY html, page BODY html, or placeholder BODY html options) it places my additional tag at the very bottom of the page, as seen in notepad+.

    It's for a php widget and I haven't uploaded it yet to my host to test, but I suspect it may fail. Preemptively, I'm trying to find a method in-app to "append" my code to the existing body tag without corrupting everything. It will be easy enough to do it manually after any final edits in Xara via notepad+, but if I use Xara later to edit the page, it gets lost or overwritten. Below are my tags:

    Xara's current entry
    Code:
    <body style="background-image:url('index_htm_files/261.png')">
    What I require to be appended to the above
    Code:
    <body onload="ACS_init();">
    What I'd like to happen in-app
    Code:
    <body onload="ACS_init();" style="background-image:url('index_htm_files/261.png')">

    Thanx in advance....... again!

  2. #2

    Default Re: Adding <body onload= parameters in Web Designer MX 8?

    Xara Web Designer is not a HTML editor, it has no internal HTML - nada. It all happens when you press 'PUBLISH' and the design is fed through the HTMLfilter.dll to produce a HTML version of your graphical design, pure WYSIWYG.
    IOW: It is a HTML generator.
    It has not been developed for code monkeys, nor has it been developed for people to fiddle with the exported source code (though that doesn't stop some of us )
    Some HTML snippets etc can be implanted using the placeholders etc, but that's about the size of it.

    With this in mind, you will soon see that there are definate limitations and restrictions. Some, you can work around with clever methods, others you just cannot no matter what. So you just get your hat'n'coat and go elsewhere or deal with it.

  3. #3
    Join Date
    Apr 2010
    Location
    Kildare, Ireland
    Posts
    906

    Default Re: Adding <body onload= parameters in Web Designer MX 8?

    Do a google search for "body onload alternative" and there seems to be a few other ways to achieve the same result without editing the body tag. One possible solution suggests calling it at the bottom of your body code after everything has loaded which would be easy to do in xara and another is to use window.onload or jquery but I haven't tried any of these methods myself and I'm no javascript expert.
    XT-CMS - a self-hosted CMS for Xara Designers - Xara + CMS Demo with blog & ecommerce shopping cart system.

  4. #4
    Join Date
    Feb 2013
    Location
    Florida
    Posts
    21

    Default Re: Adding <body onload= parameters in Web Designer MX 8?

    sledger:

    Gotcha..... I suspected as much and that's ok. I'm going to upload the page to my host soon (if I ever get done <grin>) and see if it will load the comment php I'm trying to use, as Xara places it in the page.... which is at the bottom just before the closing /body tag. And this may work now that I read xtom's reply. If not, I'll just manually add it just before uploading.

    NOTE: Oh... and as I'm sure you've realized by now, I'm no professional web designer, although I have been a hobbyist since WWW was developed way back when. I appreciate ALL you guys-n-gals help and patience sincerely!!!! ;'] Now.... if you ever need consultation on home construction or remodeling.... please indulge me. lol

    xtom: Great suggestion... and I'll definitely do my research. And.... your "calling it at the bottom of your body code after everything has loaded" suggestion is exactly what Xara is doing for me right now... so who knows... it may just work as-is. (haven't uploaded it to my host server yet to test)

    Than you again everyone.... you all have been so very helpful and patient!!!!!!
    Jim

 

 

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
  •