Click here to Skip to main content
15,849,494 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: Return negative number as 0 Pin
Richard Deeming18-May-20 6:43
mveRichard Deeming18-May-20 6:43 
GeneralRe: Return negative number as 0 Pin
and180y18-May-20 14:10
and180y18-May-20 14:10 
Questiongenerate a mongo bson objectId in angular V7+ Pin
jkirkerx17-May-20 13:51
professionaljkirkerx17-May-20 13:51 
QuestionHow to format the file containing json objects to json array Pin
kjeeva15-May-20 22:53
kjeeva15-May-20 22:53 
AnswerRe: How to format the file containing json objects to json array Pin
Richard MacCutchan15-May-20 23:31
mveRichard MacCutchan15-May-20 23:31 
QuestionMatrix creation using array Pin
Member 1483368915-May-20 11:51
Member 1483368915-May-20 11:51 
AnswerRe: Matrix creation using array Pin
Richard MacCutchan15-May-20 23:17
mveRichard MacCutchan15-May-20 23:17 
QuestionFrom PHP to Javascript Pin
Member 1482984612-May-20 5:18
Member 1482984612-May-20 5:18 
Hello
When In a PHP form I fill a field, an onBlur event validates this field and if an error occurs the my_alert function is displayed.
This is the part of the code that runs my_alert function.
$params = array(
'title' => "Warning",
'type' => "error",
'width' => '350px',
'confirmButtonText' => 'OK');
$desc="The field cannot be empty";
my_alert($desc, $params);

So far everything is ok; the my_alert function work fine.
But I wish that, when the alert window is closed, the focus remain on the invalid field and to do this I created a simple javascript function that contains a single line of code and exactly $('#field_id'). Focus () and that should be done immediately after my_alert.
The problem is that it doesn't work: the focus always goes to the next field.
However, if I remove my_alert, this does not happen.
They suggested me to try to pass $params and $desc directly to the javascript focus function and also run my_alert inside it, but I'm in trouble because I don't know javascript well.
Can someone help me?
Thank You and Best Regards
AnswerRe: From PHP to Javascript Pin
Andre Oosthuizen26-May-20 2:30
mveAndre Oosthuizen26-May-20 2:30 
QuestionJavaScript string printing. Pin
c0d3r1/29-May-20 20:24
c0d3r1/29-May-20 20:24 
QuestionMacID,SystemOs, System Version and computername using javascript Pin
rangaraghavan9-May-20 8:46
rangaraghavan9-May-20 8:46 
AnswerRe: MacID,SystemOs, System Version and computername using javascript Pin
Richard MacCutchan9-May-20 22:41
mveRichard MacCutchan9-May-20 22:41 
Questionadding markers to the map reactjs Pin
dcielak21-Apr-20 12:10
dcielak21-Apr-20 12:10 
Questioncan i use the bootstrap table with datatables ? Pin
Ask SNB20-Apr-20 21:19
Ask SNB20-Apr-20 21:19 
SuggestionRe: can i use the bootstrap table with datatables ? Pin
Richard MacCutchan20-Apr-20 23:03
mveRichard MacCutchan20-Apr-20 23:03 
AnswerRe: can i use the bootstrap table with datatables ? Pin
ZurdoDev21-Apr-20 2:41
professionalZurdoDev21-Apr-20 2:41 
AnswerRe: can i use the bootstrap table with datatables ? Pin
Jin Vincent Necesario21-Apr-20 3:17
professionalJin Vincent Necesario21-Apr-20 3:17 
Questionusing javascript geoplugin to geolocalize Pin
Member 1480782320-Apr-20 6:45
Member 1480782320-Apr-20 6:45 
QuestionRe: using javascript geoplugin to geolocalize Pin
Richard MacCutchan20-Apr-20 6:57
mveRichard MacCutchan20-Apr-20 6:57 
AnswerRe: using javascript geoplugin to geolocalize Pin
Member 1480782320-Apr-20 7:37
Member 1480782320-Apr-20 7:37 
GeneralRe: using javascript geoplugin to geolocalize Pin
Richard MacCutchan20-Apr-20 7:52
mveRichard MacCutchan20-Apr-20 7:52 
GeneralRe: using javascript geoplugin to geolocalize Pin
Member 1480782320-Apr-20 8:45
Member 1480782320-Apr-20 8:45 
GeneralRe: using javascript geoplugin to geolocalize Pin
Richard MacCutchan20-Apr-20 22:37
mveRichard MacCutchan20-Apr-20 22:37 
AnswerRe: using javascript geoplugin to geolocalize Pin
ZurdoDev20-Apr-20 7:45
professionalZurdoDev20-Apr-20 7:45 
GeneralRe: using javascript geoplugin to geolocalize Pin
Member 1480782320-Apr-20 7:52
Member 1480782320-Apr-20 7:52 

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.