Click here to Skip to main content
15,888,610 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: Generate geofence for route (pointA to pointB) Pin
JANANDOJAN29-Jul-14 23:02
JANANDOJAN29-Jul-14 23:02 
GeneralRe: Generate geofence for route (pointA to pointB) Pin
Kwod128-Dec-20 11:01
Kwod128-Dec-20 11:01 
QuestionUsing json and jquery on page not working Pin
Member 1094998624-Jul-14 8:36
Member 1094998624-Jul-14 8:36 
QuestionRe: Using json and jquery on page not working Pin
ZurdoDev24-Jul-14 10:07
professionalZurdoDev24-Jul-14 10:07 
AnswerRe: Using json and jquery on page not working Pin
Member 1094998624-Jul-14 11:14
Member 1094998624-Jul-14 11:14 
QuestionRe: Using json and jquery on page not working Pin
ZurdoDev24-Jul-14 11:40
professionalZurdoDev24-Jul-14 11:40 
AnswerRe: Using json and jquery on page not working Pin
Member 1094998624-Jul-14 11:50
Member 1094998624-Jul-14 11:50 
Questiondisable a onclick function, and enable it Pin
jkirkerx18-Jul-14 12:24
professionaljkirkerx18-Jul-14 12:24 
I have this list of items in a div container, so each item has it's own container. It's a long list of previous orders, a ticket list on the left.

You can click on the container, and the background-color will change, and it will fire a function that accesses a web service, and create a ticket for the item on the right.

LEFT SIDE | RIGHT SIDE
ORDERS | ORDER TICKET PREVIEW

I want to disable the click on the left, the orders, while the ticket on the right is created, so dumb users don't click the thing to death.

I'm not sure how to go about this one, looking for ideas. I wrote it in Javascript, with a little jQuery mixed in.
I was looking for a neat clean way to do this, without globals and chopping it up. I can't see how I can recreate the complex onclick to enable it again, and don't understand what happens to the vars I pass.

Perhaps I can somehow disable the whole container from the click, preserving the underlying click.

So this runs in a for loop, and creates a container for each previous order, with order data inside it.

Hope I was able to convey my thoughts here clearly.

function build COH_List() {
 var div_item_container = document.createElement('div');
 div_item_container.id = m_ID;
 div_item_container.className = 'div_item_container';
 div_item_container.style.width = '100%';
 div_item_container.style.height = '42px';
 div_item_container.style.margin = '3px 0px';
 div_item_container.style.borderBottom = "dotted 1px rgb(200,200,200)";
 div_item_container.style.display = 'block';
 div_item_container.style.cssFloat = 'clear';
 div_item_container.onclick = (function (m_ID, m_orderID, m_orderNumber, m_orderDate) { return function () { select_order_click(m_ID, m_orderID,    m_orderNumber, m_orderDate); }; })(m_ID, m_orderID, m_orderNumber, m_orderDate);
div_items_container.appendChild(div_item_container);


And then I have a function below that builds the order ticket.
function load_orderDetails() {
  // when this runs, disable the onclick in the function above.

}

AnswerRe: disable a onclick function, and enable it Pin
Dennis E White29-Jul-14 4:04
professionalDennis E White29-Jul-14 4:04 
GeneralRe: disable a onclick function, and enable it Pin
jkirkerx29-Jul-14 6:01
professionaljkirkerx29-Jul-14 6:01 
AnswerRe: disable a onclick function, and enable it Pin
Sibeesh KV24-Sep-14 1:01
professionalSibeesh KV24-Sep-14 1:01 
QuestionParse value from jquery to php and truncate mysql table Pin
Member 1094998617-Jul-14 7:32
Member 1094998617-Jul-14 7:32 
SuggestionRe: Parse value from jquery to php and truncate mysql table Pin
ZurdoDev29-Jul-14 10:13
professionalZurdoDev29-Jul-14 10:13 
Questionweb application for marathi input Pin
Member 104570339-Jul-14 2:37
professionalMember 104570339-Jul-14 2:37 
AnswerRe: web application for marathi input Pin
Graham Breach9-Jul-14 23:31
Graham Breach9-Jul-14 23:31 
AnswerRe: web application for marathi input Pin
Ravindra Bisen18-Jul-14 0:29
Ravindra Bisen18-Jul-14 0:29 
QuestionDate and time validation are not working. Any ideas? <Resolved> Pin
samflex5-Jul-14 12:54
samflex5-Jul-14 12:54 
AnswerRe: Date and time validation are not working. Any ideas? Pin
Richard Deeming7-Jul-14 3:02
mveRichard Deeming7-Jul-14 3:02 
GeneralRe: Date and time validation are not working. Any ideas? Pin
samflex7-Jul-14 4:21
samflex7-Jul-14 4:21 
GeneralRe: Date and time validation are not working. Any ideas? Pin
Richard Deeming7-Jul-14 4:27
mveRichard Deeming7-Jul-14 4:27 
GeneralRe: Date and time validation are not working. Any ideas? Pin
samflex7-Jul-14 4:36
samflex7-Jul-14 4:36 
QuestionRe: Date and time validation are not working. Any ideas? Pin
Richard Deeming7-Jul-14 4:45
mveRichard Deeming7-Jul-14 4:45 
AnswerRe: Date and time validation are not working. Any ideas? Pin
samflex7-Jul-14 4:51
samflex7-Jul-14 4:51 
GeneralRe: Date and time validation are not working. Any ideas? Pin
Richard Deeming7-Jul-14 5:17
mveRichard Deeming7-Jul-14 5:17 
GeneralRe: Date and time validation are not working. Any ideas? Pin
samflex7-Jul-14 5:31
samflex7-Jul-14 5:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.