When a user clicks the submit button in IE, we're getting this:
'ctl00_ctl00_ContentPlaceHolder1_search_btnSearch' is undefined
Chrome is fine, and pressing enter works.
I can't see anything strange with my code either:
<cms:SearchBox
ID="search"
SearchTextboxCssClass="searchTextbox"
ShowImageButton="false"
SearchButtonCssClass="searchButton"
SearchResultsPageUrl="~/Search-Results.aspx"
PredictiveSearchEnabled="false"
PredictiveSearchResultsCssClass="pSearch"
PredictiveSearchMinCharacters="2"
PredictiveSearchMaxResults="10"
PredictiveSearchOptions="BasicSearch"
PredictiveSearchMode="ExactPhrase"
PredictiveSearchSort="##SCORE##"
PredictiveSearchEnableSelection="true"
PredictiveSearchIndexes="KFF-Global-PagesCrawler"
ShowSearchLabel="False"
SearchMode="ExactPhrase"
runat="server" />
</div>
I'm not changing anything with the code behind either. I've tried a rebuild too.
Related
I am using window.history.back(-1) to attempt to go back to the last url, however it will work until i goto another page scroll and enter another page url through click.
Then when i go back to the previous page it scrolls to last position, But when I click the Back button again it just goes back to the scroll position and not the previous page. Even though there was a previous page.
How do I fix this. Thank you.
`
<div class="button cart-button left-right" >
<button class="btn" onclick="window.history.back(-1)" ><i class="lni lni-pointer-left"></i>Go Back</button>
</div>
I have tried using the following but get only the same results.
window.history.go(-1)
I am not sure how else to approach this problem.
Using simple HTML code, no JavaScript, nothing fancy, I use this HREF
Click here
Clicking on the link in IE, FireFox, Edge does open a new tab for https://www.example.com on click. In Chrome (version 79), the click just redisplays the current page.
This happens on Chrome desktop and phone (Android). There are no add-ins to my installation of Chrome; no popup or ad blocking installed.
Why doesn't Chrome open a new tab when target="_blank" is used? Thanks.
Added
The issue seems to be with an HREF being inside a FORM element. The FORM element is as follows:
<form action='' method='post'>
An HREF with target="_blank" outside the FORM element works properly. Just not inside the FORM element.
But still puzzled as to why that would be the case...and for a workaround or solution.
Added more - plus code
There's a button inside the form, and the button contains an image, and the link in the button will not open up a new tab.
Simple form with the button
<form action='' method='post'>
<p>inside the form</p>
<p><button><img src="https://via.placeholder.com/150 " width="24" height="24" class='button_img' alt='delete' /> that's a button</button></p>
<p><button>that's a button </button></p>
</form>
So, with even further testing, the click to open a new tab won't work in Chrome when the HREF is wrapped around an button with an image inside a form. But works in FireFox and Edge.
Why?
There are four image/buttons inside the form. The fourth one is the HREF/blank. Items 1-2-3 are form submittals; values need to be passed to the form processing page. The 4th item doesn't need to be processed by the form, but it is inside the form so that all four items will be on the same line. If I place the 4th (HREF/blank) outside of the form, then the 4th item is wrapped around to the next line.
a
The <button> tag cannot be opened in a new tab the same way an <a> does.
You can use this instead:
<p>
<button onClick="window.open('https://www.bklnk.com/B004RVZRL0');">
<img src="https://via.placeholder.com/150 " width="24" height="24" class='button_img' alt='delete' />
that's a button
</button>
</p>
i'm facting a weired problem when executing my struts2 app using IE6.
I've got a 'submit' and 'cancel' button in my form:
<s:form namespace="/myns" action="submituser" >
. . .
< s:submit type="button" value="back" label="Back" action="init"/>
<s:submit type="button" value="next" label="Next" action="submituser"/>
....
When i click on "Next" the request gets forwarded to 'init'. But this only happens when using IE6 mozilla ie8 etc work fine.
any ideas?
thanks,
Michael
I think it is 'type="button' which is causing the issue.
See here for an explanation as to what IE 6 is up to: http://www.vancelucas.com/blog/ie6-and-multiple-button-submit-elements/
I have some weirdness occurring while trying to switch from webrat to capybara. The error is this:
And I press "Create floob"
# features/step_definitions/web_steps.rb:27
no button with value or id or text 'Create floob' found (Capybara::ElementNotFound)
The html in my app looks like this:
<fieldset class="buttons">
<ol>
<input id="floob_submit" name="commit" type="submit" value="Create floob" />
</ol>
</fieldset>
I would have thought that capybara would look at the value of the buttons on the page, and reading the documentation this does seem to be the case, but it's not working! If I change the line in my cuke file to And I press "floob_submit" everything works, but I'd rather not change all my features...
Does anyone have any thoughts on why this might be happening and if there's a fix? Thanks friends!
The only thing I can see is that you aren't wrapping your input in an <li></li>. This might be confusing enough for the DOM to cause your problem.
I'm trying to use the AjaxToolkit's ModalPopupExtender, but it doesn't work. In fact, as soon as it opens, it's getting closed. So I can see that it is rendered, but it's getting closed in the second.
I tried that with IE6 and Firefox 3, it does the samething.
Here's the code:
<AjaxControlToolkit:ModalPopupExtender ID="ModalPopupExtender1" TargetControlID="ButtonTarget" PopupControlID="Panel1" OkControlID="ButtonOk" CancelControlID="ButtonCancel" BackgroundCssClass="modal-background" runat="server">
</AjaxControlToolkit:ModalPopupExtender>
<asp:Panel ID="Panel1" Style="display: none;" runat="server">
<%-- some stuff... --%>
</asp:Panel>
Use update panel for that work because when you click button it take also post back so thats why you just see the popup and it close on same time.