Asp İle Modal Popup'a İd Göndermek
-
Arkadaşlar modal po-up kullanıyorum. İd göndermediğim sayfalarda sorun yaşamıyorum ancak id gönderdiğim sayfalarda problem yaşıyorum veritabanında ki id i nasıl gönderebilirim açılan sayfaya
Şöyle deniyorum :
<a href="#?w=1000&id=<%=Rs("id")%>" rel="popup1" class="poplight"><%=Rs("ad")%><div id="popup1" class="popup_block">
<!--#include file="inc-detay.asp"-->
</div><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
//When you click on a link with class of poplight and the href starts with a #
$('a.poplight[href^=#]').click(function() {
var popID = $(this).attr('rel'); //Get Popup Name
var popURL = $(this).attr('href'); //Get Popup href to define size
//Pull Query & Variables from href URL
var query= popURL.split('?');
var dim= query[1].split('&');
var popWidth = dim[0].split('=')[1]; //Gets the first query string value//Fade in the Popup and add close button
$('#' + popID).fadeIn().css({ 'width': Number( popWidth ) }).prepend('<a href="#" class="close"><img src="close_pop.png" class="btn_close" title="Close Window" alt="Close" /></a>');
//Define margin for center alignment (vertical + horizontal) - we add 80 to the height/width to accomodate for the padding + border width defined in the css
var popMargTop = ($('#' + popID).height() + 80) / 2;
var popMargLeft = ($('#' + popID).width() + 80) / 2;
//Apply Margin to Popup
$('#' + popID).css({
'margin-top' : -popMargTop,
'margin-left' : -popMargLeft
});
//Fade in Background
$('body').append('<div id="fade"></div>'); //Add the fade layer to bottom of the body tag.
$('#fade').css({'filter' : 'alpha(opacity=80)'}).fadeIn(); //Fade in the fade layer
return false;
});
//Close Popups and Fade Layer
$('a.close, #fade').live('click', function() { //When clicking on the close or fade layer...
$('#fade , .popup_block').fadeOut(function() {
$('#fade, a.close').remove();
}); //fade them both out
return false;
});
});</script>
-
up
-
sorun yasiyorum demissinde sorun ne haci ? bir hatami aliyorsun ID mi gitmiyor ?
sayfa calismiyor seklinde dusunuyorum. parametreler gitmiyor yani. IDgonderdigin satiri soyle duzenlemeni oneririm
<a href="#?w=1000&id=<%=Rs("id")%>" rel="popup1" class="poplight"><%=Rs("ad")%>
yerine
<a href="tuy.asp?w=1000&id=<%=Rs("id")%>" rel="popup1" class="poplight"><%=Rs("ad")%> -
rakkoc : ilgin için teşekkur ederim. İd gönderemiyorum sorun bu , dediğin gibi yaptım
Bu şekilde yapınca popup da açmadan direk sayfaya yonlendi.
<a href="tuy.asp?w=1000&id=<%=Rs("id")%>" rel="popup1" class="poplight"><%=Rs("ad")%>
Bu şekilde denedim bundada popup açtı ama id göndermedi.<a href="#tuy.asp?w=1000&id=<%=Rs("id")%>" rel="popup1" class="poplight"><%=Rs("ad")%>
-
acaba yanlıs yerdemı aranıyorum sorunu,javascriptlerde de olabilirmi sorumun cevabı.
-
<a href="tuy.asp?w=1000&id=<%=Rs("id")%>#" rel="popup1" class="poplight"><%=Rs("ad")%> seklinde dene diyecegim cunku # isaretinden sonra querystring getiremezsin.
-
bu en son soyledigimi yaparsan asagidaki kismida duzenlemen gerekecek tabiki.
//When you click on a link with class of poplight and the href starts with a #
$('a.poplight[href^=#]').click(function() {
olan yeri
//When you click on a link with class of poplight and the href starts with a #
$('a.poplight[href$=#]').click(function() {yapacaksin. ben js kismini incelememistim hic.
