Firebug script window content not always updated by Jquery

122 views
Skip to first unread message

Claude LaBadie

unread,
Mar 1, 2016, 11:09:56 AM3/1/16
to Firebug

I have used jquery to update a form attribute called "data-location" and it seemed to work as the firebug html windows is showing the updated value but the same line in the script window shows the value before the jquery command. This value is a URL to be used by the process for the next URL to be directed to in case the data update by commanded by the form submission is successful. The submission of the form lead to the unaltered URL like the jquery command was unsuccessful. 
Can anyone help me understand what is going on?

The originaly generated html is:
<div id="reply-to-message-form"><script type="text/javascript" src="http://new.boxit2me.com/wp-content/plugins/pods/ui/js/jquery.json.js?ver=2.3"></script>
<script type="text/javascript" src="http://new.boxit2me.com/wp-content/plugins/pods/ui/js/jquery.qtip.min.js?ver=2.2"></script>
<script type="text/javascript" src="http://new.boxit2me.com/wp-content/plugins/pods/ui/js/jquery.pods.js?ver=2.6.1"></script>
	<form action="" method="post" class="pods-submittable pods-form pods-form-front pods-form-pod-message pods-submittable-ajax" data-location="/customer-service-area/messages-center/message-details/mark-as-replied-to/?msid=">
		<div class="pods-submittable-fields">
			<input name="action" data-name-clean="action" id="pods-form-ui-action" class="pods-form-ui-field-type-text pods-form-ui-field-name-action" value="pods_admin" type="hidden">
			<input name="method" data-name-clean="method" id="pods-form-ui-method" class="pods-form-ui-field-type-text pods-form-ui-field-name-method" value="process_form" type="hidden">
			<input name="do" data-name-clean="do" id="pods-form-ui-do" class="pods-form-ui-field-type-text pods-form-ui-field-name-do" value="create" type="hidden">
			<input name="_pods_nonce" data-name-clean="pods-nonce" id="pods-form-ui-pods-nonce" class="pods-form-ui-field-type-text pods-form-ui-field-name-pods-nonce" value="0f980c115e" type="hidden">
			<input name="_pods_pod" data-name-clean="pods-pod" id="pods-form-ui-pods-pod" class="pods-form-ui-field-type-text pods-form-ui-field-name-pods-pod" value="message" type="hidden">
			<input name="_pods_id" data-name-clean="pods-id" id="pods-form-ui-pods-id" class="pods-form-ui-field-type-text pods-form-ui-field-name-pods-id" type="hidden">
			<input name="_pods_uri" data-name-clean="pods-uri" id="pods-form-ui-pods-uri" class="pods-form-ui-field-type-text pods-form-ui-field-name-pods-uri" value="575a0d3b3e" type="hidden">
			<input name="_pods_form" data-name-clean="pods-form" id="pods-form-ui-pods-form" class="pods-form-ui-field-type-text pods-form-ui-field-name-pods-form" value="recipient,post_title,post_content,related_to" type="hidden">
			<input name="_pods_location" data-name-clean="pods-location" id="pods-form-ui-pods-location" class="pods-form-ui-field-type-text pods-form-ui-field-name-pods-location" value="/customer-service-area/messages-center/reply-to-message-and-mark-as-replied/?msid=8567" type="hidden">

			<ul class="pods-form-fields">
									<li class="pods-field pods-form-ui-row-type-pick pods-form-ui-row-name-recipient">
						<div class="pods-field-label">
							<label class="pods-form-ui-label pods-form-ui-label-pods-field-recipient pods-validate pods-validate-required" for="pods-form-ui-pods-field-recipient">
    To <abbr title="required" class="required">*</abbr></label>
						</div>

						<div class="pods-field-input">
							<div class="pods-select2">
    <div style="width: 95%" id="s2id1" class="select2-container pods-form-ui-field-type-pick pods-form-ui-field-name-pods-field-recipient pods-validate pods-validate-required pods-form-ui-field-type-select2">    <a href="javascript:void(0)" class="select2-choice">   <span>Free One</span><abbr class="select2-search-choice-close" style="display:none;"></abbr>   <div><b></b></div></a>    <div class="select2-drop select2-offscreen">   <div class="select2-search">       <input tabindex="2" autocomplete="off" class="select2-input" type="text">   </div>   <ul class="select2-results">   </ul></div></div><input style="display: none;" name="pods_field_recipient" data-name-clean="pods-field-recipient" data-label="To" id="pods-form-ui-pods-field-recipient" class="pods-form-ui-field-type-pick pods-form-ui-field-name-pods-field-recipient pods-validate pods-validate-required pods-form-ui-field-type-select2" value="36" data-field-type="select2" tabindex="2" type="hidden">
</div>

<script type="text/javascript">
    jQuery( function ( $ ) {
        if ( 'undefined' == typeof ajaxurl ) {
            var ajaxurl = 'http://new.boxit2me.com/wp-admin/admin-ajax.php';
        }

        function pods_form_ui_pods_field_recipient_podsFormatResult ( item ) {
            return item.text;
        }

        function pods_form_ui_pods_field_recipient_podsFormatSelection ( item ) {
            return item.text;
        }

        var pods_form_ui_pods_field_recipient_data = {'22' : {id : '22', text: 'cexpert'},
'25' : {id : '25', text: 'Customer Service'},
'19' : {id : '19', text: 'Ehtisham'},
'36' : {id : '36', text: 'Free One'},
'33' : {id : '33', text: 'Gold One'},
'23' : {id : '23', text: 'JackP'},
'41' : {id : '41', text: 'kellyf'},
'1' : {id : '1', text: 'lnlad'},
'38' : {id : '38', text: 'Premium Two'},
'37' : {id : '37', text: 'PremiumOne'},
'42' : {id : '42', text: 'UpgradeTester'},
'39' : {id : '39', text: 'US Warehouse'}};

        var $element = $('#pods-form-ui-pods-field-recipient' );

        $element.select2( {
			
            width : 'resolve',

			
            initSelection : function ( element, callback ) {
                var data = [];

                jQuery( element.val().split( "," ) ).each( function () {
                    if ( 'undefined' != typeof pods_form_ui_pods_field_recipient_data[ this ] ) {
                        data.push( {
                            id : this,
                            text : pods_form_ui_pods_field_recipient_data[ this ].text
                        } );
                    }
                } );

                                    if ( 0 < data.length )
                        callback( data[ 0 ] );
                            },
                            placeholder : 'Start Typing...',
                            data : [
                    {id : '22', text: 'cexpert'},
{id : '25', text: 'Customer Service'},
{id : '19', text: 'Ehtisham'},
{id : '36', text: 'Free One'},
{id : '33', text: 'Gold One'},
{id : '23', text: 'JackP'},
{id : '41', text: 'kellyf'},
{id : '1', text: 'lnlad'},
{id : '38', text: 'Premium Two'},
{id : '37', text: 'PremiumOne'},
{id : '42', text: 'UpgradeTester'},
{id : '39', text: 'US Warehouse'}                ],
                    } );

            } );
</script>

							<p class="pods-form-ui-comment pods-form-ui-comment-pods-field-recipient pods-validate pods-validate-required">
    Recipient of message</p>						</div>
					</li>
									<li class="pods-field pods-form-ui-row-type-text pods-form-ui-row-name-post-title">
						<div class="pods-field-label">
							<label class="pods-form-ui-label pods-form-ui-label-pods-field-post-title" for="pods-form-ui-pods-field-post-title">
    Title</label>
						</div>

						<div class="pods-field-input">
							    <input name="pods_field_post_title" data-name-clean="pods-field-post-title" data-label="Title" id="pods-form-ui-pods-field-post-title" class="pods-form-ui-field-type-text pods-form-ui-field-name-pods-field-post-title" tabindex="2" maxlength="255" type="text">

													</div>
					</li>
									<li class="pods-field pods-form-ui-row-type-wysiwyg pods-form-ui-row-name-post-content">
						<div class="pods-field-label">
							<label class="pods-form-ui-label pods-form-ui-label-pods-field-post-content" for="pods-form-ui-pods-field-post-content">
    Content</label>
						</div>

						<div class="pods-field-input">
							<div class="pods-form-ui-field-type-wysiwyg pods-form-ui-field-name-pods-field-post-content pods-ui-field-tinymce">
    <div id="wp-pods-form-ui-pods-field-post-content-wrap" class="wp-core-ui wp-editor-wrap tmce-active"><link rel="stylesheet" id="dashicons-css" href="http://new.boxit2me.com/wp-includes/css/dashicons.min.css?ver=4.4.2" type="text/css" media="all">
<link rel="stylesheet" id="editor-buttons-css" href="http://new.boxit2me.com/wp-includes/css/editor.min.css?ver=4.4.2" type="text/css" media="all">
<div id="wp-pods-form-ui-pods-field-post-content-editor-tools" class="wp-editor-tools hide-if-no-js"><div class="wp-editor-tabs"><button type="button" id="pods-form-ui-pods-field-post-content-tmce" class="wp-switch-editor switch-tmce" data-wp-editor-id="pods-form-ui-pods-field-post-content">Visual</button>
<button type="button" id="pods-form-ui-pods-field-post-content-html" class="wp-switch-editor switch-html" data-wp-editor-id="pods-form-ui-pods-field-post-content">Text</button>
</div>
</div>
<div id="wp-pods-form-ui-pods-field-post-content-editor-container" class="wp-editor-container"><div id="qt_pods-form-ui-pods-field-post-content_toolbar" class="quicktags-toolbar"><input id="qt_pods-form-ui-pods-field-post-content_strong" class="ed_button button button-small" aria-label="Bold" value="b" type="button"><input id="qt_pods-form-ui-pods-field-post-content_em" class="ed_button button button-small" aria-label="Italic" value="i" type="button"><input id="qt_pods-form-ui-pods-field-post-content_link" class="ed_button button button-small" aria-label="Insert link" value="link" type="button"><input id="qt_pods-form-ui-pods-field-post-content_block" class="ed_button button button-small" aria-label="Blockquote" value="b-quote" type="button"><input id="qt_pods-form-ui-pods-field-post-content_del" class="ed_button button button-small" aria-label="Deleted text (strikethrough)" value="del" type="button"><input id="qt_pods-form-ui-pods-field-post-content_ins" class="ed_button button button-small" aria-label="Inserted text" value="ins" type="button"><input id="qt_pods-form-ui-pods-field-post-content_img" class="ed_button button button-small" aria-label="Insert image" value="img" type="button"><input id="qt_pods-form-ui-pods-field-post-content_ul" class="ed_button button button-small" aria-label="Bulleted list" value="ul" type="button"><input id="qt_pods-form-ui-pods-field-post-content_ol" class="ed_button button button-small" aria-label="Numbered list" value="ol" type="button"><input id="qt_pods-form-ui-pods-field-post-content_li" class="ed_button button button-small" aria-label="List item" value="li" type="button"><input id="qt_pods-form-ui-pods-field-post-content_code" class="ed_button button button-small" aria-label="Code" value="code" type="button"><input id="qt_pods-form-ui-pods-field-post-content_more" class="ed_button button button-small" aria-label="Insert Read More tag" value="more" type="button"><input id="qt_pods-form-ui-pods-field-post-content_close" class="ed_button button button-small" title="Close all open tags" value="close tags" type="button"></div><div style="visibility: hidden; border-width: 1px;" id="mceu_35" class="mce-tinymce mce-container mce-panel" hidefocus="1" tabindex="-1" role="application"><div id="mceu_35-body" class="mce-container-body mce-stack-layout"><div id="mceu_36" class="mce-toolbar-grp mce-container mce-panel mce-stack-layout-item mce-first" hidefocus="1" tabindex="-1" role="group"><div id="mceu_36-body" class="mce-container-body mce-stack-layout"><div id="mceu_37" class="mce-container mce-toolbar mce-stack-layout-item mce-first" role="toolbar"><div id="mceu_37-body" class="mce-container-body mce-flow-layout"><div role="group" id="mceu_38" class="mce-container mce-flow-layout-item mce-first mce-last mce-btn-group"><div id="mceu_38-body"><div aria-label="Bold" role="button" id="mceu_0" class="mce-widget mce-btn mce-first" tabindex="-1" aria-labelledby="mceu_0"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-bold"></i></button></div><div aria-label="Italic" role="button" id="mceu_1" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mceu_1"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-italic"></i></button></div><div aria-label="Strikethrough" role="button" id="mceu_2" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mceu_2"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-strikethrough"></i></button></div><div aria-label="Bullet list" role="button" id="mceu_3" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mceu_3"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-bullist"></i></button></div><div aria-label="Numbered list" role="button" id="mceu_4" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mceu_4"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-numlist"></i></button></div><div aria-label="Blockquote" role="button" id="mceu_5" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mceu_5"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-blockquote"></i></button></div><div aria-label="Horizontal line" role="button" id="mceu_6" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mceu_6"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-hr"></i></button></div><div aria-label="Align left" role="button" id="mceu_7" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mceu_7"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-alignleft"></i></button></div><div aria-label="Align center" role="button" id="mceu_8" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mceu_8"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-aligncenter"></i></button></div><div aria-label="Align right" role="button" id="mceu_9" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mceu_9"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-alignright"></i></button></div><div aria-label="Insert/edit link" role="button" id="mceu_10" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mceu_10"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-link"></i></button></div><div aria-label="Remove link" role="button" id="mceu_11" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mceu_11"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-unlink"></i></button></div><div aria-label="Insert Read More tag" role="button" id="mceu_12" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mceu_12"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-wp_more"></i></button></div><div aria-label="Fullscreen" role="button" id="mceu_13" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mceu_13"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-fullscreen"></i></button></div><div aria-label="Toolbar Toggle" role="button" id="mceu_14" class="mce-widget mce-btn mce-last" tabindex="-1" aria-labelledby="mceu_14"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-wp_adv"></i></button></div></div></div></div></div><div style="display: none;" id="mceu_39" class="mce-container mce-toolbar mce-stack-layout-item" role="toolbar"><div id="mceu_39-body" class="mce-container-body mce-flow-layout"><div role="group" id="mceu_40" class="mce-container mce-flow-layout-item mce-first mce-last mce-btn-group"><div id="mceu_40-body"><div aria-haspopup="true" role="button" id="mceu_15" class="mce-widget mce-btn mce-menubtn mce-fixed-width mce-listbox mce-first" tabindex="-1" aria-labelledby="mceu_15"><button id="mceu_15-open" role="presentation" type="button" tabindex="-1">Paragraph <i class="mce-caret"></i></button></div><div aria-label="Underline" role="button" id="mceu_16" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mceu_16"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-underline"></i></button></div><div aria-label="Justify" role="button" id="mceu_17" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mceu_17"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-alignjustify"></i></button></div><div aria-label="Text color" id="mceu_18" class="mce-widget mce-btn mce-colorbutton" role="button" tabindex="-1" aria-haspopup="true"><button role="presentation" hidefocus="1" type="button" tabindex="-1"><i class="mce-ico mce-i-forecolor"></i><span id="mceu_18-preview" class="mce-preview"></span></button><button type="button" class="mce-open" hidefocus="1" tabindex="-1"> <i class="mce-caret"></i></button></div><div aria-label="Paste as text" role="button" id="mceu_19" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mceu_19"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-pastetext"></i></button></div><div aria-label="Clear formatting" role="button" id="mceu_20" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mceu_20"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-removeformat"></i></button></div><div aria-label="Special character" role="button" id="mceu_21" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mceu_21"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-charmap"></i></button></div><div aria-label="Decrease indent" role="button" id="mceu_22" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mceu_22"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-outdent"></i></button></div><div aria-label="Increase indent" role="button" id="mceu_23" class="mce-widget mce-btn" tabindex="-1" aria-labelledby="mceu_23"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-indent"></i></button></div><div aria-disabled="true" aria-label="Undo" role="button" id="mceu_24" class="mce-widget mce-btn mce-disabled" tabindex="-1" aria-labelledby="mceu_24"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-undo"></i></button></div><div aria-disabled="true" aria-label="Redo" role="button" id="mceu_25" class="mce-widget mce-btn mce-disabled" tabindex="-1" aria-labelledby="mceu_25"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-redo"></i></button></div><div aria-label="Keyboard Shortcuts" role="button" id="mceu_26" class="mce-widget mce-btn mce-last" tabindex="-1" aria-labelledby="mceu_26"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-wp_help"></i></button></div></div></div></div></div><div style="display: none;" id="mceu_41" class="mce-container mce-toolbar mce-stack-layout-item mce-last" role="toolbar"><div id="mceu_41-body" class="mce-container-body mce-flow-layout"><div role="group" id="mceu_42" class="mce-container mce-flow-layout-item mce-first mce-btn-group"><div id="mceu_42-body"><div aria-label="Insert Columns" role="button" id="mceu_27" class="mce-widget mce-btn mce-first mce-last" tabindex="-1" aria-labelledby="mceu_27"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-none" style="background-image: url('http://new.boxit2me.com/wp-content/plugins/virtue-toolkit//shortcodes/columns/img/columns.png')"></i></button></div></div></div><div role="group" id="mceu_43" class="mce-container mce-flow-layout-item mce-btn-group"><div id="mceu_43-body"><div aria-label="Insert Divider" role="button" id="mceu_28" class="mce-widget mce-btn mce-first mce-last" tabindex="-1" aria-labelledby="mceu_28"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-none" style="background-image: url('http://new.boxit2me.com/wp-content/plugins/virtue-toolkit//shortcodes/divider/img/divider.png')"></i></button></div></div></div><div role="group" id="mceu_44" class="mce-container mce-flow-layout-item mce-btn-group"><div id="mceu_44-body"><div aria-label="Insert Accordion or Tab" role="button" id="mceu_29" class="mce-widget mce-btn mce-first mce-last" tabindex="-1" aria-labelledby="mceu_29"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-none" style="background-image: url('http://new.boxit2me.com/wp-content/plugins/virtue-toolkit//shortcodes/accordion/img/accordion.png')"></i></button></div></div></div><div role="group" id="mceu_45" class="mce-container mce-flow-layout-item mce-btn-group"><div id="mceu_45-body"><div aria-label="Insert Styled Quote" role="button" id="mceu_30" class="mce-widget mce-btn mce-first mce-last" tabindex="-1" aria-labelledby="mceu_30"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-none" style="background-image: url('http://new.boxit2me.com/wp-content/plugins/virtue-toolkit//shortcodes/pullquote/img/quote.png')"></i></button></div></div></div><div role="group" id="mceu_46" class="mce-container mce-flow-layout-item mce-btn-group"><div id="mceu_46-body"><div aria-label="Insert Button" role="button" id="mceu_31" class="mce-widget mce-btn mce-first mce-last" tabindex="-1" aria-labelledby="mceu_31"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-none" style="background-image: url('http://new.boxit2me.com/wp-content/plugins/virtue-toolkit//shortcodes/btns/img/btn.png')"></i></button></div></div></div><div role="group" id="mceu_47" class="mce-container mce-flow-layout-item mce-btn-group"><div id="mceu_47-body"><div aria-label="Insert Icon" role="button" id="mceu_32" class="mce-widget mce-btn mce-first mce-last" tabindex="-1" aria-labelledby="mceu_32"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-none" style="background-image: url('http://new.boxit2me.com/wp-content/plugins/virtue-toolkit//shortcodes/icons/img/cool.png')"></i></button></div></div></div><div role="group" id="mceu_48" class="mce-container mce-flow-layout-item mce-btn-group"><div id="mceu_48-body"><div aria-label="Insert youtube" role="button" id="mceu_33" class="mce-widget mce-btn mce-first mce-last" tabindex="-1" aria-labelledby="mceu_33"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-none" style="background-image: url('http://new.boxit2me.com/wp-content/plugins/virtue-toolkit//shortcodes/youtube/img/youtube.png')"></i></button></div></div></div><div role="group" id="mceu_49" class="mce-container mce-flow-layout-item mce-last mce-btn-group"><div id="mceu_49-body"><div aria-label="Insert Vimeo" role="button" id="mceu_34" class="mce-widget mce-btn mce-first mce-last" tabindex="-1" aria-labelledby="mceu_34"><button role="presentation" type="button" tabindex="-1"><i class="mce-ico mce-i-none" style="background-image: url('http://new.boxit2me.com/wp-content/plugins/virtue-toolkit//shortcodes/vimeo/img/vimeo.png')"></i></button></div></div></div></div></div></div></div><div style="border-width: 1px 0px 0px;" id="mceu_50" class="mce-edit-area mce-container mce-panel mce-stack-layout-item" hidefocus="1" tabindex="-1" role="group"><iframe src="javascript:&quot;&quot;" style="width: 100%; height: 427px; display: block;" title="Rich Text Area. Press Alt-Shift-H for help" allowtransparency="true" id="pods-form-ui-pods-field-post-content_ifr" frameborder="0"></iframe></div><div style="border-width: 1px 0px 0px;" id="mceu_51" class="mce-statusbar mce-container mce-panel mce-stack-layout-item mce-last" hidefocus="1" tabindex="-1" role="group"><div id="mceu_51-body" class="mce-container-body mce-flow-layout"><div id="mceu_52" class="mce-path mce-flow-layout-item mce-first"><div role="button" class="mce-path-item mce-last" data-index="0" tabindex="-1" id="mceu_52-0" aria-level="0">p</div></div><div id="mceu_53" class="mce-flow-layout-item mce-last mce-resizehandle"><i class="mce-ico mce-i-resize"></i></div></div></div></div></div><textarea aria-hidden="true" style="display: none;" class="wp-editor-area" rows="20" autocomplete="off" cols="40" name="pods_field_post_content" id="pods-form-ui-pods-field-post-content"></textarea></div>
</div>

</div>

													</div>
					</li>
									<li class="pods-field pods-form-ui-row-type-number pods-form-ui-row-name-related-to">
						<div class="pods-field-label">
							<label class="pods-form-ui-label pods-form-ui-label-pods-field-related-to" for="pods-form-ui-pods-field-related-to">
    Related to</label>
						</div>

						<div class="pods-field-input">
							<input name="pods_field_related_to" data-name-clean="pods-field-related-to" data-label="Related to" id="pods-form-ui-pods-field-related-to" class="pods-form-ui-field-type-number pods-form-ui-field-name-pods-field-related-to" tabindex="2" maxlength="12" type="text">
<script>
    jQuery( function ( $ ) {
        $( 'input#pods-form-ui-pods-field-related-to' ).on( 'blur', function () {
            if ( !/^[0-9\.,\-]$/.test( $( this ).val() ) ) {
                var newval = $( this )
                    .val()
                    .replace( /[^0-9\.,\-]/g, '' );
                $( this ).val( newval );
            }
        } );
    } );
</script>

							<p class="pods-form-ui-comment pods-form-ui-comment-pods-field-related-to">
    Related to</p>						</div>
					</li>
							</ul>

			
        <p class="pods-submit">
            <img class="waiting" src="http://new.boxit2me.com/wp-admin/images/wpspin_light.gif" alt="">
            <input value=" Send Reply " class="pods-submit-button" type="submit">

                    </p>
    </div>
</form>

<script type="text/javascript">
    if ( 'undefined' == typeof pods_form_init && 'undefined' != typeof jQuery( document ).Pods ) {
        var pods_form_init = true;

        if ( 'undefined' == typeof ajaxurl ) {
            var ajaxurl = 'http://new.boxit2me.com/wp-admin/admin-ajax.php';
        }

        jQuery( function ( $ ) {
            $( document ).Pods( 'validate' );
            $( document ).Pods( 'submit' );
        } );
    }
</script>
<div class="hrule clearfix"></div></div>

		</div>

<script type="text/javascript">
    if ( 'undefined' == typeof pods_form_init && 'undefined' != typeof jQuery( document ).Pods ) {
        var pods_form_init = true;

        if ( 'undefined' == typeof ajaxurl ) {
            var ajaxurl = 'http://new.boxit2me.com/wp-admin/admin-ajax.php';
        }

        jQuery( function ( $ ) {
            $( document ).Pods( 'validate' );
            $( document ).Pods( 'submit' );
        } );
    }
</script>
<div class="hrule clearfix"></div></div>

</div> 
</div> 
</div> 
</div> 

<div class="vc_col-sm-1 wpb_column vc_column_container ">
<div class="wpb_wrapper">

</div> 
</div> 
</div>


The JQuery code is:

$(document).ready(function(){ 
var OriginalMessageId = $( "#message-id" ).html(); 
var nextPage = $('form').data('location')+ OriginalMessageId; 
$('form').attr('data-location',nextPage );
} )

Thank in advance for your time and interest.

Claude LaBadie

Sebastian Zartner

unread,
Mar 2, 2016, 2:07:08 AM3/2/16
to Firebug
Please reduce your code to a simple test case, next time! It's hard to follow what's actually wanted, otherwise.

First some clarification:
  1. What you call 'window' is called 'panel' in Firebug terminology. I noted that, because it was first unclear to me what you are referring to, and it's easier to understand each other when the same language is used.
  2. The HTML panel shows a live view of the code including all DOM modifications, while the Script panel only shows the original sources. That's the reason why you don't see your data-location attribute within the Script panel.

To your actual question:

I only skimmed your code, though it looks like you don't handle the submit event of the form. You need to either modify the action attribute of the <form> tag or prevent the default action (sumitting the form) via calling event.preventDefault() and make an AJAX request to the URL stored in the data-location attribute.


Having said that, this is out of the scope of Firebug and if you have further questions on that, I suggest to ask in a JavaScript or jQuery forum or at Stack Overflow.


Sebastian

Reply all
Reply to author
Forward
0 new messages