RadioButton Inside Datatable, Getting Undefined Error
Hello,
I have a JSF page with datatables and in each row I have radiobutton.
I would like to deselect radiobutton when user select the next row radiobutton.
To achieve this I have the following code.
function radioButton(radio) {
var id = radio.name.substring(radio.name.lastIndexOf(':'));
var el = radio.form.elements;
for (var i = 0; i < el.length; i++) {
if (el.name.substring(el[i].name.lastIndexOf(':')) == id) {
el[i].checked = false;
radio.checked = true;
And in my jsf page I am calling the javascript like
<h:selectOneRadio valueChangeListener="#{dataBean.setSelectedItem}"
onclick="radioButton(this);">
<f:selectItem itemValue="" />
</h:selectOneRadio>The issue I am having is I am getting the following error
radio.name is undefined
var id = radio.name.substring(radio.name.lastIndexOf(':')); How can I resolve this issue?
Thanks
That's a Javascript question and this is a Java forum. Locking this thread.
Similar Messages
-
Hello,
I came up with a way to use drag-and-drop interactions that will take advantage of file input so that I may create a drag-and-drop interaction that uses one draggable object over and over allowing multiple scoring/tracking possibilities. Example use...is having the draggable object be dynamic in that it randomly changes its text so that a learner can drag a term it's possible classification.........thus allowing the possibility of having many terms easily loaded without having to redo a drag-and-drop interaction for each needed terms/classifications updates/changes.
My Issue: When using a variable to represent the text for a draggable Smart Shape object, I'm getting the error message "undefined" when, clicking/pressing on the object, as well as during the drag of the object. This issue occurs when publishing the project in an HTML5 format. Flash interestingly enough seems to work perfect...but we are not interested in publishing via Flash any longer.
To better help you explore this error message, I've set up a test project so that you can see when and how the "undefined" message shows up during a drag-and-drop interaction. I've also included the Captivate 8 project file used to make the exploration project I'm sharing in this post.
Link to Captivate project I created for you all to explore "undefined" error message": http://iti.cscc.edu/drag_and_drop_bug/
Link to this Captivate 8 Project file: http://iti.cscc.edu/drag_and_drop_bug.cptx
It's pretty interesting how things react in this demo, please try the following actions to see some interesting happenings:
Drag the Yellow (or variable drag box) to the drag target.
Drag Black Hello square to Drag target and click undo or reset - watch the undefined message come up on the Yellow (or variable drag box).
Drag the Yellow (or variable drag box) to the drag target and then use the undo or reset.
Move both draggable boxes to the drag target and use the undo and reset buttons...
Anyhow, I know you all are sharp and will run the demo through its paces.
I'd really be very honored if anyone help me figure out how I could (when publishing out to HTML5) no longer have the "undefined" error message show up when using drag-and-drop with a variable for shape text. This technique has been well received at the college I work at...and I have many future project requests for using such an idea on a variety of similar interactions. I'd love see a solution or see if this might be a bug Adobe may be able to fix!
I tried to find a solution to the issue documented here for quite some time, but I was not able to find anyone with this problem much less attempting the idea I'm sharing in the help request - save the darn "undefined" message that comes up!
Many thanks in advance for any help and/or direction that you all may be able to provide,
PaulHello,
I just wanted to supply a minor update related to my drag-and-drop question/issue stated above:
I did another test using Captivate 7, and found that the undefined error (publishing as HTML5) does not appear and the variable data remains visible - except the variable data turns very small and does not honor any font size related settings.
I did go ahead and submit this to Adobe as a possible bug today.
Thanks again for any help related to this issue. If the issued documented above is solved, it will allow many amazing things to be done using Captivate's drag-and-drop for both regular type projects as well as interaction development for iBooks!
Matter of fact if this issue gets fixed, I'll publish a Blog entry (or video) on way's I've used Captivate's drag-and-drop to create dynamic learning activities for Higher Ed. and for use in iBooks.
~ Paul -
Getting undefined error for current document in script
I'm getting a "Error Number: 2" "Error String: myDoc is undefined" in my script.
I tweaked some scripts so they traverse my entire book, and open up every section (document) in my book and run the code for each section.ext
The code runs great and opens and closes sections where it doesn't find text to add links to, but once it opens a document and finds text that it CAN add links to, it throws that error. Below is my code:
main();
exit();
function main() {
var myBook = app.activeBook,
myDocs = myBook.bookContents.everyItem().getElements(),
myDoc,
myHyperlinkStyle,
myCount = 0;
for (var i=0; i< myDocs.length; i++) {
myDoc = app.open(File("\\\\computerOnNetwork\\c$\\Folder\\" + myDocs[i].name));
myHyperlinkStyle = myDoc.characterStyles.item("linkstyle");
try {
var script = app.activeScript;
} catch(err) {
var script = File(err.fileName);
var myScriptFolderPath = script.path;
var myFindChangeFile = new File(myScriptFolderPath + "/SearchTextAndUrls.txt"); //mac path for users desktop //File.openDialog("Choose the file containing the tab separated list");
//alert(myFindChangeFile)
myFindChangeFile = File(myFindChangeFile);
var myResult = myFindChangeFile.open("r", undefined, undefined);
if(myResult == true){
app.findTextPreferences = NothingEnum.nothing;
app.changeTextPreferences = NothingEnum.nothing;
//Loop through the find/change operations.
do {
//read 1 line into myLine
myLine = myFindChangeFile.readln();
myFindChangeArray = myLine.split("\t");
//The first field in the line is the value to find
myFindVal = myFindChangeArray[0];
// second is the url
myFindUrl = myFindChangeArray[1];
doSearchAndReplace(myFindVal, myFindUrl, app.activeDocument);
} while(myFindChangeFile.eof == false);
myFindChangeFile.close();
// reset search
app.findTextPreferences = NothingEnum.nothing;
app.changeTextPreferences = NothingEnum.nothing;
alert("Done! " + myCount + " hyperlinks have been added.");
myDoc.close();
function doSearchAndReplace(stringfind, urlstring, searchin) {
app.findTextPreferences.findWhat = stringfind;
//Set the find options.
app.findChangeTextOptions.caseSensitive = false;
app.findChangeTextOptions.includeFootnotes = false;
app.findChangeTextOptions.includeHiddenLayers = false;
app.findChangeTextOptions.includeLockedLayersForFind = false;
app.findChangeTextOptions.includeLockedStoriesForFind = false;
app.findChangeTextOptions.includeMasterPages = false;
app.findChangeTextOptions.wholeWord = false;
var myFoundItems = searchin.findText();
for (i = 0; i < myFoundItems.length; i++) {
var myHyperlinkDestination = myMakeURLHyperlinkDestination(urlstring);
myMakeHyperlink(myFoundItems[i], myHyperlinkDestination);
myFoundItems[i].applyCharacterStyle(myHyperlinkStyle, false);
myCount++
function myMakeHyperlink(myFoundItem, myHyperlinkDestination){
try {
var myHyperlinkTextSource = myDoc.hyperlinkTextSources.add(myFoundItem);
var myHyperlink = myDoc.hyperlinks.add(myHyperlinkTextSource, myHyperlinkDestination);
myHyperlink.visible = false;
catch(myError){
function myMakeURLHyperlinkDestination(myURL){
//If the hyperlink destination already exists, use it;
//if it doesn't, then create it.
try{
var myHyperlinkDestination = myDoc.hyperlinkURLDestinations.item(myURL);
myHyperlinkDestination.name;
catch(myError){
myHyperlinkDestination = myDoc.hyperlinkURLDestinations.add(myURL);
myHyperlinkDestination.name = myURL;
//Set other hyperlink properties here, if necessary.
return myHyperlinkDestination;
Any and all help is greatly appreciated!This ended up being my fixed/final code:
main();
exit();
function main() {
var myBook = app.activeBook,
myDocs = myBook.bookContents.everyItem().getElements(),
myDoc,
myHyperlinkStyle;
for (var i=0; i< myDocs.length; i++) {
myDoc = app.open(File("\\\\computerOnNetwork\\c$\\Folder\\" + myDocs[i].name));
myHyperlinkStyle = myDoc.characterStyles.item("linkstyle");
try {
var script = app.activeScript;
} catch(err) {
var script = File(err.fileName);
var myScriptFolderPath = script.path;
var myFindChangeFile = new File(myScriptFolderPath + "/SearchTextAndUrls.txt"); //mac path for users desktop //File.openDialog("Choose the file containing the tab separated list");
//alert(myFindChangeFile)
myFindChangeFile = File(myFindChangeFile);
var myResult = myFindChangeFile.open("r", undefined, undefined);
if(myResult == true){
app.findTextPreferences = NothingEnum.nothing;
app.changeTextPreferences = NothingEnum.nothing;
//Loop through the find/change operations.
do {
//read 1 line into myLine
myLine = myFindChangeFile.readln();
myFindChangeArray = myLine.split("\t");
//The first field in the line is the value to find
myFindVal = myFindChangeArray[0];
// second is the url
myFindUrl = myFindChangeArray[1];
doSearchAndReplace(myFindVal, myFindUrl, app.activeDocument, myDoc, myHyperlinkStyle);
} while(myFindChangeFile.eof == false);
myFindChangeFile.close();
// reset search
app.findTextPreferences = NothingEnum.nothing;
app.changeTextPreferences = NothingEnum.nothing;
alert("Done! Hyperlinks have been added.");
myDoc.close();
function doSearchAndReplace(stringfind, urlstring, searchin, myDoc, myHyperlinkStyle) {
app.findTextPreferences.findWhat = stringfind;
//Set the find options.
app.findChangeTextOptions.caseSensitive = false;
app.findChangeTextOptions.includeFootnotes = false;
app.findChangeTextOptions.includeHiddenLayers = false;
app.findChangeTextOptions.includeLockedLayersForFind = false;
app.findChangeTextOptions.includeLockedStoriesForFind = false;
app.findChangeTextOptions.includeMasterPages = false;
app.findChangeTextOptions.wholeWord = false;
var myFoundItems = searchin.findText();
for (i = 0; i < myFoundItems.length; i++) {
var myHyperlinkDestination = myMakeURLHyperlinkDestination(urlstring, myDoc);
myMakeHyperlink(myFoundItems[i], myHyperlinkDestination, myDoc);
myFoundItems[i].applyCharacterStyle(myHyperlinkStyle, false);
function myMakeHyperlink(myFoundItem, myHyperlinkDestination, myDoc){
try {
var myHyperlinkTextSource = myDoc.hyperlinkTextSources.add(myFoundItem);
var myHyperlink = myDoc.hyperlinks.add(myHyperlinkTextSource, myHyperlinkDestination);
myHyperlink.visible = false;
catch(myError){
function myMakeURLHyperlinkDestination(myURL, myDoc){
//If the hyperlink destination already exists, use it;
//if it doesn't, then create it.
try{
var myHyperlinkDestination = myDoc.hyperlinkURLDestinations.item(myURL);
myHyperlinkDestination.name;
catch(myError){
myHyperlinkDestination = myDoc.hyperlinkURLDestinations.add(myURL);
myHyperlinkDestination.name = myURL;
//Set other hyperlink properties here, if necessary.
return myHyperlinkDestination; -
LoadVariables "undefined" error
I have the following line, which is just a loadVariables:
loadVariables("data.txt", _root.fa);
This loads a data file, located at the root level, which includes the name of an .mp3 file, which is located in a folder; root/media:
&faFile=player1.mp3
And then later I have this line which loads the sound from the .mp3:
this.sound.loadSound ("media/" + faFile, true);
But when I run this I get:
undefined
Error opening URL 'file:///jeffrey/Downloads/mp3%5Fplayer%5Ffiles%5Fedit/media/undefined'
Can someone tell me what I'm doing wrong here?
Please?this.createEmptyMovieClip("target_mc",this.getNextHighestDepth());
loadVariables("load.txt", target_mc);
var faFile:String;
var my_sound:Sound = new Sound();
function checkParamsLoaded() {
if (target_mc.faFile == undefined) {
trace("not yet.");
} else {
faFile = target_mc.faFile;
trace(faFile);
my_sound.loadSound("http://charlesnewmanpubl.com/media/"+faFile,true);
clearInterval(param_interval);
var param_interval:Number = setInterval(checkParamsLoaded, 100);
my_sound.onLoad = function(success:Boolean) {
if (success) {
my_sound.start();
trace("Sound loaded");
} else {
trace("Sound failed");
The above code is working for me.(with a text file load.txt having &faFile=Sweethearts_On_Parade_BRGK.mp3 )
I tested and heard the sound. -
Using Click Functions Inside ItemRenderers Causing "Undefined Method" error
I have a tilelist which has an item renderer and the item renderer has a small button in it which intentionally should remove the specific item once the button is clicked making each item removable from the tilelist by clicking the little button on each item within the tilelist. However when I try to apply my removeProduct() function, which I've already defined, to the button I get the error "Call to a possibly undefined method" but this function can be applied to other buttons fine so I know it has been defined correctly. It just seems to throw this error when I try to apply it to the button inside the itemrenderer of my tilelist. Anyone else had this problem? Is it to do with it being within a item renderer?
Here's my code for the function:-
public function removeProduct():void {
var item:Object = cartTilelist.selectedItem;
var idx:int = shoppingCartAC.getItemIndex(item);shoppingCartAC.removeItemAt(idx);forst create custom Event:
public class MyItemEvent extends Event
public static const MY_ITEM_REMOVE:String = "MyItemEventRemove";
private var _myItemClicked:Object;
public function get myItem() : Object{
return this._myItemClicked;
public function MyItemEvent(type:String,itemParam:Object, bubbles:Boolean=true, cancelable:Boolean=false)
super(type, bubbles, cancelable);
this._myItemClicked = itemParam;
override public function clone():Event{
return new MyItemEvent(this.type,this._myItemClicked,this.bubbles,this.cancelable); // bubbling support inside
inside you Item renderer create util function (you dont have to, but its cleaner) :
private function removeItem() : void {
this.dispatchEvent(new MyItemEvent (MyItemEvent .MY_ITEM_REMOVE,this.data,true,true));
and then third step (again inside Item renderer) asign that function as click event handler to button:
<mx:LinkButton id="removeButton" label="X" fontSize="8" paddingLeft="0" paddingRight="0" paddingTop="0" paddingBottom="0" cornerRadius="6" color="#FF0000" click="removeItem()" x="1" y="-2"/>
now wherever you have your tilelist add listiner to it following way , (or any other way you find it fit )
yourTileListComponent.addEventListener(MyItemEvent .MY_ITEM_REMOVE,
function(e:MyItemEvent):void
trace(this + "ItemTo Remove is: " + e.myItem); -
I am getting the following error with IE9 and Firefox 26 with application express 3.2:
SCRIPT5007: Unable to get value of the property 'nodeName': object is null or undefined
apex_ns_3_1.js, line 589 character 10
this.dialog.check2 = function (e){
var tPar = html_GetTarget(e);
var lEl = $x('apexir_col_values_drop');
var l_Test = true;
****** while(tPar.nodeName != 'BODY'){
tPar = tPar.parentNode;
if(tPar == lEl){l_Test = false;}
if(l_Test){$x_Remove('apexir_col_values_drop')}
This happens when I click the Gear Icon, then Filter, then I click the dropdown arrow under expressions and pick an expression from the list.
If I set (through IE Developer tools) back to IE8 mode, I don't get the error.Guess no one is using 3.2 any longer or no one else gets this error..... Guess I can edit the JavaScript file to trap the error since it really doesn't seem to cause an issue. Just didn't want to have to go that route.
-
I am getting followong error
XML Parsing Error: undefined entity
Location: chrome://weave/content/options.xul
Line Number 6, Column 3: <setting id="weave-account" type="string" title="&account.label;" />
--^I had this problem - it appeared to be due to having Firefox 4 with the Firefox Sync installed as an add-on. Firefox 4 has sync included so there is no need to have it as an add-on. I went to the add-on manager and removed Firefox Sync and now appears to be working correctly.
-
When I try to start Firefox I get an Error Message: (Javascript /application) Error on adding toolbar element. TypeError, aButtonLabel is undefined. id. Google Shortcut settings. Firefox will not start. I have been through the troubleshooting steps. Nothing helps
== I tried to enter Firefox. No apparant reason ==
== User Agent ==
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2; AskTbGLSV5/5.8.0.12304)Hi,
had this problem but now sorted.
Go to settings for google shortcuts, follow link to homepage and upload latest version, it has not yet been approved by Firefox, but works and solves the bug.
Hope this helps.
A -
I am using Adobe Creative Cloud, I go into Apps and I get the error message undefined. I cannot download anything. I try to refresh application, nothing. I can even see what I downloaded previously. I am using windows 7, 64 bit.
This worked fine for me for until this morning.I am on an hp experiencing a similar issue e.g., Creative cloud download error 'undefined'. On an hp. screengrab attached.
-
Not much to add. Before Firefox will open, I get this error message, "plug-in object: TypeError: Components.classes[cid] is undefined". I click the "OK" button; Firefox opens and I have no further problems.
I use an Apple with OS v. 10.6.7 and had no problems until I downloaded Firefox 4.0That indicates you have an add-on that is not compatible with Firefox 4. For details of how to troubleshoot that see https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes
-
What can I do about this:
After upgrading to firefox 6, I get this error.
When I click to open Firefox, A box open with the following error:
JAVASCRIPT Application
TypeError: Components.classes[cid] is undefined?
After I click close on the box, then Firefox will start. I really just want to get the error fixed so that when I want firefox open, I don't have to see this box anymore.You need to figure out which add-on is causing that error and disable it until the developer of that add-on fixes it. There may be an error message about that in the Error Console, accessed through the Web Developer menu item or through {Ctrl + Shft + J}.
Also see this: <br />
http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes -
I upgraded to firefox 4 and now whenever I open the browser or a new window in the browser I get an error message that reads "Components.classes[cid] is undefined. How do I fix this message. I have reinstalled firefox 4 three times and still get the message. I am running windows 7 pro
Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
* Don't make any changes on the Safe mode start window.
* https://support.mozilla.com/kb/Safe+Mode
* [[Troubleshooting extensions and themes]]
If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
* Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
* Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit") -
Every time I use F.F. I get this error. TypeError: Components.classes['@softage.ru/skype/SkypeFfExtension;1'] is undefined
Does anyone else get this and or know how to remove it?
Many thanks for your help and supportThis issue is caused by the Skype extension for Firefox.
*https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes
Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
*Don't make any changes on the Safe mode start window.
*https://support.mozilla.com/kb/Safe+Mode -
Hello,
I am getting an error 'CalendarNotify' as null or undefined in the code at SP.UI.ApplicationPages.CalendarNotify in SharePoint 2013 after migration from SharePoint 2010. The SharePoint calendar is customized to display the events with colors and other
customizations.
It was developed in SharePoint 2010 using client side objects /jquery. After migration to 2013 stopped working.
The code looks like in the following url...
http://www.westpoint.edu/news/SiteAssets/ColorCoding.txt
Thanks in advance.Hi,
According to your description, my understanding is that the CalendarNotify is null after migrating to SharePoint 2013.
I suggest you can check if the sp.js has been loaded properly using Internet Explorer Developing Tools. We can use the following script to run function after the sp.js has been loaded.
ExecuteOrDelayUntilScriptLoaded(somefunction(), "sp.js");
Here is a detailed article for your reference:
http://msdn.microsoft.com/en-us/library/jj193034.aspx
Best Regards
Zhengyu Guo
TechNet Community Support -
Getting undefined reference error
Hi Iam using GCC 4.1.2 in solaris with Oracle 9.0.2
I have the following program
#include <iostream.h>
#include <occi.h>
using namespace oracle::occi;
using namespace std;
int main()
Environment *Env = Environment::createEnvironment(Environment::DEFAULT);
When I do compile Iam getting the error
undefined Reference Environment::createEnvironment(Environment::Mode,void,void.....
etc error
Please let me mkw what Iam missingAfter also Iam getting this error still in Solaris, g++ 4.1.2 with Oracle 9.2.0
Undefined first referenced
symbol in file
__1cG__CrunKpure_error6F_v_ /usr/local/pkg/oracle/9.2.0/lib/libocci.so
__1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___2G6Mpkc_r1_ /usr/local/pkg/oracle/9.2.0/lib/libocci.so
__1cG__CrunIex_alloc6FI_pv_ /usr/local/pkg/oracle/9.2.0/lib/libocci.so
__1cG__CrunIex_throw6Fpvpkn0AQstatic_type_info_pF1_v_v_ /usr/local/pkg/oracle/9.2.0/lib/libocci.so
__1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___2G6Mrk1_r1_ /usr/local/pkg/oracle/9.2.0/lib/libocci.so
__1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___2t6MpkcIrkn0C__v_ /usr/local/pkg/oracle/9.2.0/lib/libocci.so
__1cH__rwstdRexcept_msg_string2t6MIE_v_ /usr/local/pkg/oracle/9.2.0/lib/libocci.so
__1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___2t6Mpkcrkn0C__v_ /usr/local/pkg/oracle/9.2.0/lib/libocci.so
__1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___Gassign6Mrk1II_r1_ /usr/local/pkg/oracle/9.2.0/lib/libocci.so
_
Maybe you are looking for
-
XDM has problems with consolekit
I recently switched from SLIM to XDM, and now when I shutdown the computer in gnome (launched using ck-launch-session), the computer sometimes restarts instead, even though I pressed 'shutdown'. This didn't occur with GDM or SLIM. /etc/inittab line x
-
Itunes doesnt recognise content on my iphone 5
so i bought some cds and imported them onto itunes i plugged my phone in so i could sync them and it came up with the message that itunes doesnt recognise the content and basically i will have to restore my phone. i was okay in restoring my phone as
-
Might be a dumb question, but . . . Is H.264 a compression codec for Quicktime movies only? Not for Flash videos? My CS3 version of Flash Video Encoder seems to offer On2 VP6 and Sorenson Spark as the compression codecs for Flash video, flv. Are ther
-
Dualdisc cd side won't play on my mac mini intel core duo w Superdrive
Shakira Fijacion Oral DualDisc "CD" side will insert and then automatically reject from my Mac Mini - Intel Core Duo. The DVD side plays fine. Unfortunately iTunes not smart enough to work with DVD side. There is a query in IPOD forum about Springste
-
Anybody can send me ABAP Dynpro Pdf, step to steps stuffs. Thanks Anil Mishra