Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Daniel Iser

    (@danieliser)

    This can be done two ways. Via JavaScript after page loads if you say have 20 buy now buttons that each have a different price. This is basically how the easy modal purchase modals work. I created one modal and used JS to set the prices when each button is clicked.

    Second way which is only good if you have one modal and it will only need to show the price for one item per page load. For this you would use a custom shortcode that you would add as the modals content. In the shortcode function you would have access to the $_GET variable.

    Hope this helps.

    Thread Starter dherfort

    (@dherfort)

    Hi,
    this really helps 😉

    With various scripts/plugins ALL my javascript is not working…so I would need to get a AJAX script into the modal, is this possible?

    Thread Starter dherfort

    (@dherfort)

    Let me ask in another way:

    I want either a calculator with javascript or a calc with php…as I managed to get php running 😉 (not a miracle) I wanted to choose this function to embed it inside a modal…but since a “function” (in my knowledge) is only loaded on click it is not working as the modal is all the time closed…is there a chance to force it to stay open?

    Best,
    Daniel

    Plugin Author Daniel Iser

    (@danieliser)

    unfortunately what your asking isnt really the best way to do it. PHP is in fact not a good method for ajax type functionality.

    A calculator would best be done via pure JS since it has all the math functions built in, no waiting for page refreshes between number entries etc.

    Thread Starter dherfort

    (@dherfort)

    thank you very much for your answer 🙂

    After lots of research I finally found out, that the webserver did not support javascript at all 😉 so i managed to get it working after installing the js engine and now everything is fine.

    a simple “onclick=”formname.formtype/name.value=’yourvalue’ ” resolved it and managed to get the “variable” into your awesome modals 🙂

    Plugin Author Daniel Iser

    (@danieliser)

    Great, glad you got your setup working. I have not seen a server before that didnt support JS by default, new one for me..

    Please take a moment to rate and review the plugin and/or support http://wordpress.org/support/view/plugin-reviews/easy-modal

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Chance to get a php variable into the Model Windows’ is closed to new replies.