How to Add Function to Existing Code

Find out what does your audience think

How to Add Function to Existing Code

New postby xso232 » Sat Apr 20, 2013 6:44 am

I would like to add this function with no values attached

onload="callHide();"

to the ID="sexy_alert_body"

I did a text search and it only comes up durring |sexy_alert_body| in sexypolls.js

Which file would I add this?

if not I would take it back one parent to see if the person has voted, then load a diffent button (repeat of existing) Vote button...
xso232
 
Posts: 3
Joined: Sat Apr 20, 2013 6:38 am

Re: How to Add Function to Existing Code

New postby Simon » Sat Apr 20, 2013 2:07 pm

Hi,

Unfortunately you can't add a function to sexy_alert_body because it generates dynamically via javascript. That is why you can't file any file except sexypolling.js.

Could you explain more detailed what you try to achieve. If it will be useful for option, maybe I will add it as default option on next version.

Best Regards,
Simon
User avatar
Simon
Site Admin
 
Posts: 1306
Joined: Wed Jul 13, 2011 8:53 pm

Re: How to Add Function to Existing Code

New postby xso232 » Sat Apr 20, 2013 3:48 pm

I acctually want to call the function callShow() of a hidden div

- on the highlighted buttons I have already attached the OnClick Event callHide()
- This Hides the Highlighted box in the picture below, to make room for the expanding voting box.
which works absolutly fine, except for under one condition...
Image



If the condition is true that someone has already voted... The Div will be hidden because the Vote Button was pressed... However the Vote refusal box comes up and the div should be "Reshown visable" on the trigger of loading one of these divs, even a simple mouseover of the entire box would do it.

Image
xso232
 
Posts: 3
Joined: Sat Apr 20, 2013 6:38 am

Re: How to Add Function to Existing Code

New postby Simon » Sat Apr 20, 2013 8:55 pm

Ok,

If you subscribe PRO version, I will send you unpacked version of javascript, and you can make changes you need.
User avatar
Simon
Site Admin
 
Posts: 1306
Joined: Wed Jul 13, 2011 8:53 pm

Re: How to Add Function to Existing Code

New postby xso232 » Mon Apr 22, 2013 7:53 am

Thats great, I'll PM you.
xso232
 
Posts: 3
Joined: Sat Apr 20, 2013 6:38 am

Re: How to Add Function to Existing Code

New postby Simon » Mon Apr 22, 2013 9:11 pm

Great,

I've sent you the file. Please check your email.
User avatar
Simon
Site Admin
 
Posts: 1306
Joined: Wed Jul 13, 2011 8:53 pm


Return to Sexy Polling

Who is online

Users browsing this forum: No registered users and 4 guests

cron