/    Sign up×
Community /Pin to ProfileBookmark

Adding a pop up message when a workshop is fully booked

I have created the following form – [url]http://www.ruks.co.uk/form.html[/url]

their are 4 dates booking and 2 workshop session per day

On may 27th the Key stage 1&2 booking is full, is their a way I can have a function where a pop up comes up stating fully booked when a user tries to click on may 27th and Key stage 1&2 booking from the drop down

hope this make sense

thanks

Ruksana

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@pradzz7May 15.2014 — try this i guess you want something like this only.

code :

<select id="hello" >

<option id="option11" value="131">Tuesday May 27</option>

<option id="option21"value="141">Wednesday May 28 </option>

<option id="option11" value="131">Thursday May 29 </option>

<option id="option21"value="141">Saturday May 31</option>

</select>

<select id="hello2" onchange="updateTxtContent();">

<option id="option1" value="13">Foundations Stage (2-5 yrs) </option>

<option id="option2"value="14">Key Stage 1&2 (6-10 yrs) </option>

</select>

<script>

function updateTxtContent(){

var a = document.getElementById('hello').value ;

if (a=="131"){var b = document.getElementById('hello2').value ;

if (b=="14"){

alert("house is full");

return;


}

}


}


</script>
Copy linkTweet thisAlerts:
@ruks12authorMay 15.2014 — I did that and it worked, but on the website it is embedded on it comes up with the following message

the page at http://www.ruks.co.uk says:

[ATTACH]16143[/ATTACH]

[canned-message]attachments-removed-during-migration[/canned-message]
×

Success!

Help @ruks12 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...