wants that when I click on the any index hyperlink, then it is displayed on main description page - html

I have made an web page. There are two iframes
In it. First is of index and second one is description page. I want that when I click on the any index hyperlink, then it is displayed on main description page.
How it will be possible? please give me the HTML code

You can use a button and when clicking it, change the url of the iFrame using Javascript like this:
document.getElementById('iframe-id').src = newLink;
You can use the data-attribute to store the wanted link in your html.
In case you want to do that: It is not possible to react to things outside of an iFrame through an iFrame. So you cannot put a link in iFrame1 and have it reload iFrame2, because those are two different websites and don't see each other.
Now, idk what exactly you are planing to do, but I really hope, that you don't want to make your entire site like that. Using iFrames is really only useful for things like inserting widgets (like Codepen etc.), but should never be used to display information from your own site. If you don't want to copy your html for every site then use PHP. If you don't want to reload your entire webpage (which is pretty much never a problem) you can use AJAX-requests to load parts of your website. (Frameworks like React.js, Angular.js and Vue.js do that for you)

Related

Linking to iframe pages

Is possible to link on sub page that is in iFrame?
So basically:
On www.domain.com/page I have just normal HTML page. And on that page I have iFrame where I get the content from www.anotherdomain.com.
Now on anotherdomain.com I have several subpages likes this:
www.anotherdomain.com/spage1
www.anotherdomain.com/spage2
etc.
Now the question is that is it possible to somehow link to one of these frames so that when user uses this link, it would go on one of these subpages. For example like this:
www.domain.com/page#spage2
so that then the www.domain.com/page would show on iframe the content from the page www.anotherdomain.com/spage1
If I have understood correctly, this is not possible but I just need some confirmation on this :)
Sorry for bad explanation. Ask more info if you didn't understand what Im trying to explain.
If I understand what you are asking for correctly:
When a visitor goes to domain.com/page#spage2 you want them to see a url of: www.domain.com/page with the content of anotherdomain.com/spage2
If this is correct, I don't think you can do this with just HTML. You would need either regex in a .htaccess file or with PHP taking advantage of the $_SERVER["PHP_SELF"] call.

Is there a way to change the site title url in wordpress through css?

Im using wordpress.com to host my blog. When you click on the site image, it takes you back to the blog home page and not the homepage the belongs to my site.
I know how to change this with an installed wordpress through the editor menu.
However, I dont have any of these option on wordpress.com, however, I have full access to mutate stuff through css.
Is there a way to force CSS to make the changes for me.
Site
However, I want it to read
Site
Just to recap, I dont have an option to change this through the editor. My only option of changing this is through CSS.
I was thinking to use something like this to replace the text inside the herf. But I cant even get it to work with the example text.
Thanks a million.
No - CSS is a read-only way to style page content, not change the content itself (which that tag is a part of).

Page url links to pages internal frame

I have a personal website, which I have made (to the best of my ability) without a template. I am not very experience in HTML so am not entirely sure if this is bad practice or not, but here is my issue.
My website consists of a frameset, which has 3 frames. Two do not change (banner and nav panel), and the other is content. The way I display my content in the main frame is through an iframe. Here's where the trouble comes. I have suggested my website to the crawler, and it crawls all the pages for content, of course. When I click on one of my links suggested by google (say, a project), the browser loads that individual .html file, without any of the rest of my frames. In other words, it does not link to the page through my index.html which sets up the formatting and page frames, but simply loads the html as a stand-alone page.
Is there a way I can avoid this, so that if a link for my website is clicked from an external link (not from my domain), the page first loads my index.html, and then the page of interest, so that it appears as if it were accessed normally from my index? I am not sure whether I should find a new way of displaying my content in the main frame so that it avoids iframes, or just need a simple script to redirect the user.
Not sure if it's useful but I've attached a photo of my page just to better explain what the frame layout is that I am working with.
Many thanks!!!
iFrames are definitely not the route to take when you are displaying consistent content... Which from what appears to be the Navigation, Header, and of course, the Content. Of course there will be an issue when a "Search Engine Spider" crawls your page... From my understanding, seeing as you are calling "content" from another page, the spider will crawl that page but will not crawl the index.html page we are currently viewing. When a "Spider" crawls a page it looks for STATIC HTML Tags/Content/Keywords/etc, and seeing as you are calling all of your content from other pages the "Spider" will treat that content as being on another page as well.
You want me recommendation? Avoid using an iFrame at all times. The point of an iFrame is to display content from another location (external), and or display static content on a page without having to scroll the current page you are viewing the iFrame on.
It is bad practice to use an iFrame, I would suggest using DIVs. Within these DIVs you may place content, images, links... Virtually anything you want, with all of the benefits of having people view your website, along with Search Engine Spiders.
I hope this helps!
Thanks,
Aaron
iFrames are a bad choice. AJAX is VERY simple these days. Just replace the big iFrame with a Div, and AJAX a page, putting the contents into that Div.
Replace your anchors with tags, and replace href with name, like so:
<div name='main.html' class='link' />
You need a div with the id 'loadHere':
Then include jQuery (it's pretty easy, google it) and at the end of your HTML put this:
$('.link').click(function(){
$.post(this.name,function(dat){
$('#loadHere').html(dat); }); });

Convert Site with messenger to work like facebook

Hello I'm creating a site at the moment (asp.net mvc) which has a div at the bottom side of the page that works as a messenger.
I would like to find a way to make the site work like facebook's chat. In other words, when a user clicks on a link on the site to load the content on the back however the messenger to stay in tact without loading again.
Will I have to change the site so every page is loaded with an ajax request? Also, I don't want to use iframes.
The only way to have elements to stay on screen from page to page without using iframes to use ajax requests, something like load() if you're uisng jQuery.
Most sites that do it use some variation of hashbangs, so a page can be loaded by directly entering it's url, rather than necessitating a path through other pages.
To do what you propose has fundamental implications to the structure of the entire site, so if this messenger box isn't anything more than a gimmick, I wouldn't bother. I'd even go so far as to say that if you're not sure how you'd do this one thing, you shouldn't be trying to build a site around it.
Well if you dont want your chat to disappear even for a moment with full site refresh, then yes, you have to change your page to ajax loading. It is not such a pain as it looks - for example use jquery to intercept all clicks on anchors, make ajax call to their href, and replace some "all-wrapping" placeholder div with the returned content.. Not very pretty usage of ajax, but it works, and your chat stays in place.

Embed a webclip

I am wondering if there's a way I can embed a webclip into a webpage, as in, I can have a portion of a webpage embedded as a widget into another page. I was thinking it might be possible someway though Mac OS X's Dashboard widgets, one can take a webclip and make a dashboard widget, as I hear that they are HTML based, and thus one could reverse-engineer one into simple HTML code. Kind of the reverse of what google does for gadgets. Any ideas? I'm open to any solutions.
Thanks.
The easy, html-based way is with an iframe. What this does is put an entire webpage within a box on your page. You don't have much flexibility with it.
You can also do it with javascript. JQuery makes it easy with their .load() method. Going this route, you can load a webpage with javascript, load specific tags within that page, or even modify the incoming code before displaying it.
Most basically:
$("#xxxx").load("url.html");
Where xxxx is the id of the html tag where you want the content to be loaded on your page (e.g. if you have <div id="xxxx">content will go here</div> in your HTML). See more details at: http://docs.jquery.com/Ajax/load.
If these don't suffice, the next step would be PHP (I doubt you'd need it, but if you'd like to, you car search for file_get_contents on php.net).