|
The first question would be is $("#calendar a") finding the elements and applying the click event?
No comment
|
|
|
|
|
AeonBlue wrote: <script type="text/jscript">
$("#calendar a").bind('click', function () {
TurnOffMessage();
return true;
});
</script>
I am guessing that the above code is located in the head of your html document. The bind won't work because the document (html) has not been loaded yet.
Simple solution - move your javascript code down towards the end of the file. In general I place jQuery script right before the closing of the body tag.
while it is permitted to put javascript in the head of your document best practices generally dictate that you place code for working with the document at the end prior to closing the body .
this will assure that "most" everything is currently in the document. the exception being any html generated code from jQuery (plugins, etc.).
as if the facebook, twitter and message boards weren't enough - blogged
|
|
|
|
|
Thanks, that was indeed a very good guess. I did, however, notice my error shortly after posting this and moved it to the bottom of the main page and achieved the same results as I had before: Clicking the days doesn't affect the pop-up but clicking the months does.
"The shortest distance between two points is under construction"
-Noelie Altito
|
|
|
|
|
the reason being is because the asp:Calendar is a server rendered control.
so changing the month causes the need for the control to be re-rendered. personally I have never been a big fan for many of the asp controls. since you are using jQuery might I recommend you use a jQuery plugin and just eliminate the need for a server rendered control??
here is one that I use - http://trentrichardson.com/[^]
as if the facebook, twitter and message boards weren't enough - blogged
|
|
|
|
|
Hi,
i have an popup which is an aspx page and when i click on browser close button..., the system should check if there is any unsaved data in the form or not. If there is any unsaved data then the message should be displayed (Do you want to leave..?) with OK and Cancel button...
On click of the OK button, the data should not be saved and the user should be returned parent form ie popup should be closed and return to the parent form.On click of the cancel button, the control should return to the Pop.
I had tried the below code...
window.onbeforeunload = close;
function close() {
var result=confirm("Do you really want to close this window");
if (result) {
return true;
}
else {
location.href = document.URL;
}
}
The above code is not working ie the popup is getting closed even on click of closse button....
and when clicked on OK it is dispalying another msgbox with leave this page and Stay on this page buttons...
Please help me regarding the same...
|
|
|
|
|
I wish the following may solve u issue.
<script language="javascript">
function close() {
var flgDataUnsaved = false;
if ( flgDataUnsaved ){
event.returnValue = "Do you really want to close this window";
}else{
event.returnValue = true;
}
}
window.onbeforeunload = close;
</script>
and u can put a "save" button on your popup page. The user can save the data themselves.
Good day,Good job,Good life
|
|
|
|
|
I believe this line
event.returnValue = "Do you really want to close this window";
should be
event.returnValue = confirm("Do you really want to close this window");
|
|
|
|
|
I have the following code in my aspx page. for some reason disabled=true/false not working, any idea why?
function chkboxlistchecking(chkMed,chkBeh,chkReports)
{
// Go through all items of a check list control
var cbkSelect = document.getElementById(chkMed);
var cbkAdd = document.getElementById(chkBeh);
var cbkEdit = document.getElementById(chkReports);
if(cbkSelect.checked == true || cbkAdd.checked == true )
{
cbkEdit.checked=true;
cbkEdit.disabled=true;
}else
{
cbkEdit.checked=false;
cbkEdit.disabled=true;
}
}
|
|
|
|
|
You have coded
cbkEdit.disabled=true;
twice. Is this what you mean to do?
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
mistypo.. still not working
|
|
|
|
|
Exactly what is not working?
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
What are you passing into the function? Are you passing the name of the elements as strings, or passing in as the actual object.
|
|
|
|
|
I am passing checkbox.ClientID
|
|
|
|
|
Hi,
please alert the value of cbkEdit, and check whether it is a valid object or not.And make sure that the ID is same.
|
|
|
|
|
if you look at my code I setting up checked=True/False and it working, only disabled not working.
|
|
|
|
|
I think u should check the Checklist.clientID. The following code works both in IE and Chrome.
<script type="text/javascript" language="javascript">
function chkboxlistchecking(chkMed, chkBeh, chkReports) {
// Go through all items of a check list control
var cbkSelect = document.getElementById(chkMed);
var cbkAdd = document.getElementById(chkBeh);
var cbkEdit = document.getElementById(chkReports);
if (cbkSelect.checked == true || cbkAdd.checked == true) {
cbkEdit.checked = true;
cbkEdit.disabled = true;
} else {
cbkEdit.checked = false;
cbkEdit.disabled = true;
}
}
</script>
<input id="ch_s" type="checkbox">Select</input>
<input id="ch_a" type="checkbox">Add</input>
<input id="ch_e" type="checkbox">Edit</input>
<br /><button onclick="javascript:chkboxlistchecking('ch_s','ch_a','ch_e');">check</button>
anyway , u can move cbkEdit.disabled=true out of the if statement.
function chkboxlistchecking(chkMed, chkBeh, chkReports) {
var cbkSelect = document.getElementById(chkMed);
var cbkAdd = document.getElementById(chkBeh);
var cbkEdit = document.getElementById(chkReports);
cbkEdit.checked = (cbkSelect.checked == true || cbkAdd.checked == true)
cbkEdit.disabled = true;
}
Good day,Good job,Good life
|
|
|
|
|
|
And what is the problem? What have you tried?
No comment
|
|
|
|
|
I have got the radio buttons to total up ok, I need some kind of code to get just one picture instead of all 4 in the results page
Any chance you could have a look Mark
|
|
|
|
|
I'm not meaning to be evasive but it is really a very simple if statement. You have a go at it yourself, then ask for help if you have problems
No comment
|
|
|
|
|
Hey Mark, I appreciate that, but im am stuck with were to start, can one of the pictures be shown subject to the total that is created by a user? using javascript?
I am learning currently learning javascript basics but struggling with making a script work for this project
|
|
|
|
|
Here is a hint
if(Foo < 5)
{
...
}
else if(Foo > 5 && Foo < 10)
{
...
}
Does that give you any thoughts?
No comment
|
|
|
|
|
No javascript will do nothing unless you ask it to. Once again, this is very simple exercise that would do you much better to attempt on your own rather than having someone give you the answer. Try something then post what you have and ask a question about what you don't understand
No comment
|
|
|
|
|
Below is code i have got from " this link.
can any one tell me.. what link it will generate??"[^]
var from = "2011-10-09";
var to = "2011-11-09";
if (to.match(/^\d{4}[-]\d{2}[-]\d{2}$/) && from.match(/^\d{4}[-]\d{2}[-]\d{2}$/)) {
var query = webCore.createQuery(webCore.marketAction.getDataSeries, {}, {
FromDate: from,
ToDate: to,
Instrument: webCore.getInstrument(),
hi__a: "0,1,2,4,21,8,10,11,12,9",
ext_xslt_lang: currentLanguage,
ext_xslt_options: "," + $("#adjustedId:checked").val() + ",",
ext_xslt: "hi_table_shares_adjusted.xsl",
ext_contenttype: "application/ms-excel",
ext_contenttypefilename: "_" +
webCore.getInstrument() + ".xls",
ext_xslt_hiddenattrs: ",ip,iv,",
ext_xslt_tableId: "historicalTable"
}
);
$("#excelQuery").val( query );
$("#excelForm").attr( "action", webCore.proxyURL ).submit();
i got this code from view source.
i think webCore.getInstrument() will return SSE4928 but am not sure whta will be whole query.. so i will get link and i can access data from it.
|
|
|
|
|
I am kind of at a lost here without being to know more about what webCore is. I can speculate that this is a webKit issue but I don't want to make that assumption.
from the text of your post...
Mugdha_Aditya wrote: Below is code i have got from " this link.
can any one tell me.. what link it will generate??"[^]
it looks like you intended to offer a link but maybe deleted it or something??
try posting the information again or if you can debug the call and see what query looks like. since you are assigning it to a text box I have to ask what are you seeing when you run the code??
if nothing then my first assumption is that query is not text but rather maybe an object.
as if the facebook, twitter and message boards weren't enough - blogged
|
|
|
|