We have a bunch of modal dialogs in our application. When a user clicks a button it fetches the modal content from the server and displays it to the user. The way that it is structured, in order to fetch the content from the server, the button is nested inside of a form tag with an action specifying the URL to fetch the modal from. Because we can't nest form tags, this severely limits where we can place modal toggles without doing a lot of CSS trickery.
So, I'm wondering if it is acceptable from an accessibility standpoint to use an anchor tag with a valid href to display the modal. We'll intercept the click with JavaScript, fetch the content via ajax, and display it on the modal. If JavaScript isn't working or the user opens the link in a new tab, they'll still see the modal content, just with a sparse layout.
Is this a reasonable and accessible approach to take? It seems like as long as the anchor has a valid href it should be fine, and provides a tiny bit more flexibility to the user if they want to open up the link in a new tab.
Related
I have setup DFP to return a list of Custom Creatives. Each of these creavtives contains the following HTML:
<a href='%%CLICK_URL_UNESC%%' class='drop-down-ad'>Ad Link Text</a>
When these creatives are rendered to the page I have some JavaScript that finds all the anchor tags containing the class drop-down-ad and grabs the src attribute and stops the page from changing when clicked and loads content in via ajax. I do not want the page to change but I would like to still tell DFP that the user click the link. I am not sure if this functionality is supported by DFP?
Is making a request to the generated CLICK_URL_UNESC using ajax supported by DFP? Or is this not a thing I should be doing.
Hopefully I have explained what I am trying to do ok. Let me know if you have any questions.
A rough layout of my ASP.NET site is as follows
The main navigation currently relies on url query parameters (i.e <a href="/?category=InStock">) to determine what charting control is dynamically loaded.
I would like to improve on this design by adding an UpdatePanel to this design and having the panels update the chart / graph when a new category is selected. Since the anchor tags trigger a Page.Redirect when clicked I'm wondering if this can still be done with update panels or if I will have to modify my navigation <a href> tags to be Button controls?
The main reason we decided to go with <a href> tags was for the ability to bookmark a site and save the state of the page so the user return to that specific chart when needed.
What you could do is change your <a href> tags to button or linkbutton controls, ditch your current querystring driven logic, and just change the graph based on which button was clicked instead.
You could then add your update panel(s), enable browser history management in your ScriptManager and create history points when each button is clicked.
See this msdn article for details: https://msdn.microsoft.com/en-us/library/cc488548.aspx
What this does is inject the current page information in the browser's history and encodes the state that you specify in the querystring automatically.
This means the user can bookmark the current state of the page and everything is still AJAX'd.
Another good article covering the ASP.NET AJAX History feature:
https://web.archive.org/web/20211020103240/https://www.4guysfromrolla.com/articles/100808-1.aspx
In Joomla page I have big content and I want to make not pages like 1,2,3...etc., but like in Facebook scroll down till you see button "Click to see more" and without refresh It add some data to bottom of page.
I don't know how to make It, maybe here are any extensions? Or any scripts? So hard to make It?
Thank you for answers.
To do it the ajax way, i.e. only loading content when you intend to show it, you will need to write a custom jQuery function that onload:
finds the "next page" button and store the url into a variable (this will contain the whole url followed by &pagenumber=2 or /page/2 or something similar).
remove its handler and replace it with a custom ajax call:
jQuery.get with the url you just stored adding &format=raw (this will return the content of the next page, without the rest of the template, and without any scripts and css - which you have already loaded)
on success remove the "next page" button you modified,
then insert in its place the html received from the ajax call,
repeat from n.1 until there is no "next page" button
After reading your query i come to know that you have a large content in your joomla article. Once the page loads you want to show some part of content n later part shows once clicked on see more button. If i'm correct then write script inside your article add div tags into your content. Apply display none property to the content of div which you want to show on click. Using JQuery or Js you can show the hidden part once clicked on button.
So, I have a page (page1.html) and then I have an iframe or object serving up some other page (page2.html) within that page... What I want/need is when the user clicks a link inside the iframe (page2.html) i need a way for page1.html to recognize that the iframe href has changed because the link is loaded into the iframe.
There is no onload event for the object/iframe element so i can't figure out when the user has clicked a link inside the IFRAME (page2.html)...
You have very little control over what happens in an iFrame. Essentially, once you load it, you have no power over it, and you can't see what happens in it. (You can still tell it to load something else.) If you want that sort of control, you should really be using AJAX, i.e. you should be loading new content into the document object model dynamically.
right click on the link and then click open in a new tab / new window, this will open the webpage in a new tab , then copy the url from the address bar of the browser.
I have a page which is used to display numerous forms for the user to fill out and get reports generated. Each of these forms is inside it's own ASP:Panel control so that I can toggle the visibility of the form (so that only those with appropriate permissions get access to the reports they are allowed to).
The client has now requested a "table of contents" like area on the page with hyperlinks pointing to each of the forms (so that they don't have to spend time scrolling the page to find the particular report form they want). This is easy to accomplish using standard <a href="#Area"> and <a id="Area"> tags. What I am now looking for is a way that would allow me to hide the links of reports that the user does not have access to.
I was first thinking of using the ASP:LinkButton control, but I do not want any postbacks to occur from clicking the links (that would be very unnecessary). Are there any other methods I could use to accomplish the same goal? I am looking for something which would make it easy for me to toggle the visibility of the corresponding link at the same time I am toggling the visibility of the panels containing the report forms (done now from the code-behind).
Note: Using VB as the language
If you use link controls you can just show or hide the link bases on the visibility of its related panel.
Link1.Visible = Panel1.Visible
I was first thinking of using the ASP:LinkButton control, but I do not want any postbacks to occur from clicking the links (that would be very unnecessary)
I disagree. You're talking about redrawing most of the page each time a link is clicked, making a full postback appropriate from a technical standpoint. Additionally, users are conditioned to expect a round-trip to the server when they click on links. That's what a hyperlink normally does. So it's also appropriate from a user-experience standpoint.