Welcome to TalkGraphics.com
Results 1 to 9 of 9
  1. #1
    Join Date
    Mar 2015
    Posts
    11

    Default Click on a graphic element and Run Php script in a placeholder

    We have good success integrating code and xara web designer 10 premium web pages.... but we have a need we cant seem to find a solution for.
    Experts, experienced users and programmers please take a look and see if you can help us with a solution or an idea.

    What we need to do...
    1. click on an icon
    2. Run a php script
    3. Display the php script output in a placeholder

    Linking the icon to script is not an issue, embedding the code in a placeholder is not an issue.
    Non of the standard xara option we are aware of will result in what we need to do which is to do both.

    In case this was as clear as mud.............
    I'm sure everyone has logged into an online account by selecting a login icon that typically displays a login form to float on top of the page (@high z value) and after login is successful a "Logged in" message is displayed on the page header or elsewhere.

    our roadblocks............

    We are trying to adhere to the constraint of maintaining the xara automated page export function which as you know requires that we keep any code integration within the xara page and produced by xara insert functions or other page integration tools/options.

    For those that might say "just do a separate page outside of xara... I agree this so simple without the xara protocol but keeping xara as a web dev. tool allows us to use interns ect. to do basic and even advanced front end work and then pass the project to the programmers. Jumping off the xara train is something I want to avoid if possible.

    Thanks for any help
    Ron

  2. #2
    Join Date
    Aug 2010
    Posts
    533

    Default Re: Click on a graphic element and Run Php script in a placeholder

    Hi Ron, you could probably use AJAX http://www.w3schools.com/php/php_ajax_database.asp

  3. #3
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,895

    Default Re: Click on a graphic element and Run Php script in a placeholder

    Why not have the login icon in a placeholder.
    On clicking the icon the placeholder page moves on to a log-in dialogue form.
    Filling in the log-in form and clicking Submit runs the php file and either alerts an error or loads a success page?
    Egg

    Intel i7 - 4790K Quad Core + 16 GB Ram + NVIDIA Geforce GTX 1660 Graphics Card + MSI Optix Mag321 Curv monitor
    + Samsung 970 EVO Plus 500GB SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  4. #4
    Join Date
    Mar 2015
    Posts
    11

    Default Re: Click on a graphic element and Run Php script in a placeholder

    Thanks to jamesd and Egg Bramhill, two great ideas! jamesd, we tried ajax before we made this post for assistance, but we had an internal error with xara when ajax began the xmlhttp request open, we started testing to see what was throwing the catch in xara but havent had any luck yet, it seems like a goo method so we will keep trying that one. Egg Bramhill, we had not tried the icon in a placeholder, we do have several other php and js scripts inserted via placeholders that run without user input. We will keep trying on the ajax idea and will also work the icon in a placeholder idea. If we have success I will credit you and post the details, maybe it will help someone else. Thanks again for the reply and the rgeat ideas, I really appreciate your time.

  5. #5
    Join Date
    Mar 2015
    Posts
    11

    Default Re: Click on a graphic element and Run Php script in a placeholder

    Still havent found a working solution, any more ideas or elaboration on the ones provided already will be appreciated.

  6. #6

    Default Re: Click on a graphic element and Run Php script in a placeholder

    After embedding the PHP code in placeholders, I assume you are naming the page with a .php extension and then testing online?

  7. #7

    Default Re: Click on a graphic element and Run Php script in a placeholder

    I've tested this in all browsers, works fine.
    Is this the sort of thing you're looking for?

    http://xara-users.info/protected/

  8. #8

    Default Re: Click on a graphic element and Run Php script in a placeholder

    Dunno why I bothered...

  9. #9
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,745

    Lightbulb Re: Click on a graphic element and Run Php script in a placeholder

    Quote Originally Posted by steve.ledger View Post
    Dunno why I bothered...
    You bother because you care.
    Some OPs do not understand, only take, but a number do give back and that we appreciate.

    Should anyone post a question and get any answer back:


    • Post again with how excellent, how naff or how wrong the answer was.
    • Explain how it worked or didn't.
    • Accept that there may not be an answer, so don't blame the messenger.
    • Respect those who answer a different question.
    • Feel free to contribute your successes, understanding or revelations.


    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

 

 

Tags for this Thread

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
  •