Click here to Skip to main content
15,895,084 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: object expected Pin
Ankit Aneja12-Jun-11 0:28
Ankit Aneja12-Jun-11 0:28 
QuestionHow to submit the below form using Javascript? Pin
Dotnetkanna10-Jun-11 2:17
Dotnetkanna10-Jun-11 2:17 
AnswerRe: How to submit the below form using Javascript? Pin
Alex Manolescu11-Jun-11 12:11
Alex Manolescu11-Jun-11 12:11 
AnswerRe: How to submit the below form using Javascript? Pin
Atulkryadav16-Jun-11 8:18
Atulkryadav16-Jun-11 8:18 
QuestionJavascript print with out pop up Pin
yesu prakash10-Jun-11 1:01
yesu prakash10-Jun-11 1:01 
AnswerRe: Javascript print with out pop up Pin
Gerben Jongerius10-Jun-11 1:50
Gerben Jongerius10-Jun-11 1:50 
AnswerRe: Javascript print with out pop up Pin
Alex Manolescu11-Jun-11 12:13
Alex Manolescu11-Jun-11 12:13 
AnswerRe: Javascript print with out pop up Pin
Atulkryadav16-Jun-11 8:25
Atulkryadav16-Jun-11 8:25 
Give whatever element u wanna print this id "printMe".

Include this script in your head tag:

<script language="javascript">

var gAutoPrint = true;

function processPrint(){

if (document.getElementById != null){

var html = '<HTML>\n<HEAD>\n';

if (document.getElementsByTagName != null){

var headTags = document.getElementsByTagName("head");

if (headTags.length > 0) html += headTags[0].innerHTML;

}

html += '\n</HE' + 'AD>\n<BODY>\n';

var printReadyElem = document.getElementById("printMe");

if (printReadyElem != null) html += printReadyElem.innerHTML;

else{

alert("Error, no contents.");

return;

}

html += '\n</BO' + 'DY>\n</HT' + 'ML>';

var printWin = window.open("","processPrint");

printWin.document.open();

printWin.document.write(html);

printWin.document.close();

if (gAutoPrint) printWin.print();

} else alert("Browser not supported.");

}

</script>


Call the function
<a href="javascript:void(processPrint());">Print</a>

Atul Kumar

Questionjquery and html encoding Pin
fififlowertot10-Jun-11 0:26
fififlowertot10-Jun-11 0:26 
AnswerRe: jquery and html encoding Pin
Gerben Jongerius10-Jun-11 1:46
Gerben Jongerius10-Jun-11 1:46 
Questiononclick event isn't fired Pin
Ali Al Omairi(Abu AlHassan)3-Jun-11 9:59
professionalAli Al Omairi(Abu AlHassan)3-Jun-11 9:59 
AnswerRe: onclick event isn't fired Pin
AspDotNetDev3-Jun-11 18:41
protectorAspDotNetDev3-Jun-11 18:41 
GeneralRe: onclick event isn't fired Pin
Ali Al Omairi(Abu AlHassan)4-Jun-11 2:38
professionalAli Al Omairi(Abu AlHassan)4-Jun-11 2:38 
AnswerRe: onclick event isn't fired Pin
AspDotNetDev4-Jun-11 9:20
protectorAspDotNetDev4-Jun-11 9:20 
GeneralRe: onclick event isn't fired Pin
Ali Al Omairi(Abu AlHassan)4-Jun-11 20:23
professionalAli Al Omairi(Abu AlHassan)4-Jun-11 20:23 
GeneralRe: onclick event isn't fired Pin
Ali Al Omairi(Abu AlHassan)5-Jun-11 4:58
professionalAli Al Omairi(Abu AlHassan)5-Jun-11 4:58 
GeneralRe: onclick event isn't fired Pin
AspDotNetDev6-Jun-11 8:35
protectorAspDotNetDev6-Jun-11 8:35 
GeneralRe: onclick event isn't fired Pin
Ali Al Omairi(Abu AlHassan)7-Jun-11 0:36
professionalAli Al Omairi(Abu AlHassan)7-Jun-11 0:36 
QuestionRegarding JQueryCurrency Pin
dayakar_dn31-May-11 0:33
dayakar_dn31-May-11 0:33 
AnswerRe: Regarding JQueryCurrency Pin
thatraja3-Jun-11 18:19
professionalthatraja3-Jun-11 18:19 
QuestionPopulating a textbox inside usercontrol thru jquery. Pin
fififlowertot30-May-11 1:09
fififlowertot30-May-11 1:09 
AnswerRe: Populating a textbox inside usercontrol thru jquery. Pin
AspDotNetDev30-May-11 1:52
protectorAspDotNetDev30-May-11 1:52 
GeneralRe: Populating a textbox inside usercontrol thru jquery. Pin
fififlowertot30-May-11 3:49
fififlowertot30-May-11 3:49 
QuestionTooltip(true,escape('Benito's Taco Shop'),event) Pin
smraj150325-May-11 19:03
smraj150325-May-11 19:03 
AnswerRe: Tooltip(true,escape('Benito's Taco Shop'),event) Pin
Graham Breach25-May-11 20:39
Graham Breach25-May-11 20:39 

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.