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

JavaScript

 
Questionget the value of row before changing in table if cancel click Pin
ahmed_sa25-Jul-16 7:13
ahmed_sa25-Jul-16 7:13 
QuestionCode is not working correctly Pin
Member 1265075924-Jul-16 2:31
Member 1265075924-Jul-16 2:31 
SuggestionRe: Code is not working correctly Pin
Richard MacCutchan24-Jul-16 2:48
mveRichard MacCutchan24-Jul-16 2:48 
AnswerRe: Code is not working correctly Pin
John C Rayan27-Jul-16 22:20
professionalJohn C Rayan27-Jul-16 22:20 
Questionneed help understanding how regular updating of a div works Pin
Member 1263409813-Jul-16 16:55
Member 1263409813-Jul-16 16:55 
AnswerRe: need help understanding how regular updating of a div works Pin
John C Rayan15-Jul-16 0:12
professionalJohn C Rayan15-Jul-16 0:12 
AnswerRe: need help understanding how regular updating of a div works Pin
ZurdoDev15-Jul-16 2:26
professionalZurdoDev15-Jul-16 2:26 
QuestionNeed help understanding this piece of code Pin
Jaime Premy10-Jul-16 5:53
professionalJaime Premy10-Jul-16 5:53 
Hi there, new on this forum and looking for help with some code I found at Cross Browser RDLC Printing - CodeProject. The author didn't include source or demo files and does not reply to my comments either, so I turned to this forum for help.

The author supposedly shows a tip on how to create a print button for rdlc reportviewer for non IE browsers:

...If not, we should create a client-side print icon button on the fly.

How to create one that exactly looks like the original print button?

The answer is so straightforward, by copying the markup for the original button.

Here is what RDLC uses for creating the print icon:
JavaScript
$print = $('<div class=" " style="display:inline-block;
font-family:Verdana;font-size:8pt;vertical-align:top;"><table title="Print">
<tbody><tr><td><input name="ReportViewer1$ctl05$ctl06$ctl00$ctl00$ctl00" 
title="Print" style="width: 16px; height: 16px;" type="image" 
alt="Print" src="/Reserved.ReportViewerWebControl.axd?
OpType=Resource&Version=11.0.3366.16&
Name=Microsoft.Reporting.WebForms.Icons.Print.gif"></td></tr></tbody
</table></div>');
  • Notice that we created a JavaScript object which represents the markup.
This icon must be added to the RDLC viewer toolbar and this is how to find the toolbar object on the client-side:
JavaScript
var findtoolbar = function () {
var $all = $('table div');
for (var i = 0, len = $all.length; i < len; i++) {
if ($($all[i]).css('background-image').toLowerCase().indexOf('toolbar_bk.png') != -1)
return $($all[i]);
}
return null;
}

As you see, there is no solid identification method for the toolbar, so we used a combination of certain properties like background image along with the order of objects in the DOM...


Well he does not show WHERE and HOW to actually add the icon to the toolbar. I tried to do
JavaScript
$(document).ready(function () {
findtoolbar.add($print);
});

and it threw an error (of course?), but with my limited knowledge of javascript and jquery, that's all I could come up with. So I was hoping someone here could help me make some sense out of this Wink | ;-) . Thanks in advance.
The perfect woman: cooks good food and never says no in the middle of the night.

AnswerRe: Need help understanding this piece of code Pin
ZurdoDev15-Jul-16 2:31
professionalZurdoDev15-Jul-16 2:31 
GeneralRe: Need help understanding this piece of code Pin
Jaime Premy15-Jul-16 5:21
professionalJaime Premy15-Jul-16 5:21 
GeneralRe: Need help understanding this piece of code Pin
ZurdoDev15-Jul-16 5:26
professionalZurdoDev15-Jul-16 5:26 
GeneralRe: Need help understanding this piece of code Pin
Jaime Premy16-Jul-16 18:22
professionalJaime Premy16-Jul-16 18:22 
GeneralRe: Need help understanding this piece of code Pin
ZurdoDev17-Jul-16 8:19
professionalZurdoDev17-Jul-16 8:19 
QuestionWhat is the work of callback argument in NodeJs "module.exports"? Pin
MaxySpark4-Jul-16 10:03
MaxySpark4-Jul-16 10:03 
AnswerRe: What is the work of callback argument in NodeJs "module.exports"? Pin
rah_sin12-Jul-16 0:42
professionalrah_sin12-Jul-16 0:42 
QuestionForming your own panel Pin
Member 126139631-Jul-16 3:06
Member 126139631-Jul-16 3:06 
AnswerRe: Forming your own panel Pin
Richard MacCutchan1-Jul-16 3:48
mveRichard MacCutchan1-Jul-16 3:48 
QuestionError in parentNode.replaceChild while hiding content which is available in web page Pin
srikrishnathanthri1-Jul-16 2:41
srikrishnathanthri1-Jul-16 2:41 
QuestionChange webpage background on the fly (If it worked) Pin
Born5929-Jun-16 2:00
Born5929-Jun-16 2:00 
AnswerRe: Change webpage background on the fly (If it worked) Pin
Richard Deeming29-Jun-16 2:06
mveRichard Deeming29-Jun-16 2:06 
PraiseRe: Change webpage background on the fly (If it worked) Pin
Born5929-Jun-16 2:12
Born5929-Jun-16 2:12 
QuestionJSHint & Sublime use and config Pin
DavidMillar246828-Jun-16 21:00
DavidMillar246828-Jun-16 21:00 
AnswerRe: JSHint & Sublime use and config Pin
Richard MacCutchan28-Jun-16 21:20
mveRichard MacCutchan28-Jun-16 21:20 
AnswerRe: JSHint & Sublime use and config Pin
Kornfeld Eliyahu Peter28-Jun-16 22:55
professionalKornfeld Eliyahu Peter28-Jun-16 22:55 
QuestionConfirm always returning false on Firefox for IOS Ver 4.0 Pin
jkirkerx23-Jun-16 12:35
professionaljkirkerx23-Jun-16 12:35 

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.