Keyword

Alert function in "Add an item"

  • Ante Oja
  • Ante Oja's Avatar Topic Author
  • Offline
  • New Member
More
14 years 1 month ago #95307 by Ante Oja
Alert function in "Add an item" was created by Ante Oja
Hello!

I wonder how to insert a alert   for the "Extra Fields (in the add an item box)"





 

For example so if the users on my website forget to type in the in the "URL box" it brings up a Alert "     Please select a category"

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I found:

if (trim( document.adminForm.title.value ) == "") {            alert( '<?php echo JText::_('Item must have a title', true); ?>' );        } else if (trim( document.adminForm.catid.value ) == "0") {            alert( '<?php echo JText::_('Please select a category', true); ?>' );        } else {

But how do I find the (for example document.adminForm.title.value) name for the URL field?

 

Hope someone understand what I mean.

Would have been really nice  if someone could help me with this! Thanks in advance! :)

Please Log in or Create an account to join the conversation.

  • Ante Oja
  • Ante Oja's Avatar Topic Author
  • Offline
  • New Member
More
14 years 1 month ago #95308 by Ante Oja
Replied by Ante Oja on topic Alert function in "Add an item"
I Could find:

if (trim( document.adminForm.title.value ) == "") {            alert( '<?php echo JText::_('Item must have a title', true); ?>' );        } else if (trim( document.adminForm.catid.value ) == "0") {            alert( '<?php echo JText::_('Please select a category', true); ?>' );        } else {

But how do I find the (for example document.adminForm.title.value) name for the URL field?

 

Thanks in advance!

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum