Tek Butonla 2 Action Göndermek Asp
-
merhabalar, bayağı uğraştım çözemedim bu durumu.. web sitesine 2-3 tane resim yollıyacam fakat bunları form içerisnde seçtikten sonra tek butonla farklı actionlara göndermek isriyorum..
örn
<form id="form1" name="form1" method="post" action="1.asp" ENCTYPE="multipart/form-data" >
<input type="file" name="file" />
<input name="Submit" type="submit" value="gonder" />
</form>
<br>
<form id="form2" name="form2" method="post" action="2.asp" ENCTYPE="multipart/form-data" >
<input type="file" name="file" />
<input name="Submit" type="submit" value="gonder" />
</form>bunu birleştirip 1. kısmı 1.asp ye 2. kısmı 2.asp ye tek butonla yollamak gibi..
Teşekkürler..
-
hocam önce 1.asp ye yolarsın 2sinide sonra 1.asp den form olusturup hidden yaparsın response.redirect yaparak 2.asp ye gönderirsin sonra istedigini yaparsın
-
yok hoca o şekilde değil demek istediğim.. anlattığım gibi bi yöntem olması lazımdı.. araştırdım scriptle falan varda benim bu istediğim şekle yemiyor.. bilen biri çıkar umarım. tşkler
-
bi ihtimal de söyle o buttona onclick eventi atayıp js ile deneye bilirsin boylece hem o dugmenın formunu hem de eventın tetıkledigı formu gondermeyı deneyebilirsin ama olur mu bilmem. Js ıle post olayı csrf de kullanılıyo baya orda onload icın kullandıkları seyı sen o butona onclıck olarak atayacaksın ıste :) umarım calısır :)
-
javascriptle yapabilirsin
function gonder(){
document.getElementById('form').action='1.asp';
document.getElementById('form').submit();document.getElementById('form').action='2.asp';
document.getElementById('form').submit();}
butonun onclick eventine şettir test etmedim ama olması gerek
-
cosmic bunu yazdı:
-----------------------------
javascriptle yapabilirsin
function gonder(){
document.getElementById('form').action='1.asp';
document.getElementById('form').submit();document.getElementById('form').action='2.asp';
document.getElementById('form').submit();}
butonun onclick eventine şettir test etmedim ama olması gerek
-----------------------------hocam js den anlamam ama bu kodda formu 2sine birden yollamaz mı?
-
caner1365 bunu yazdı:
-----------------------------
cosmic bunu yazdı:
-----------------------------
javascriptle yapabilirsin
function gonder(){
document.getElementById('form').action='1.asp';
document.getElementById('form').submit();document.getElementById('form').action='2.asp';
document.getElementById('form').submit();}
butonun onclick eventine şettir test etmedim ama olması gerek
-----------------------------hocam js den anlamam ama bu kodda formu 2sine birden yollamaz mı?
-----------------------------sırayla gitmesi lazım
-
malesef olmuyor bu şekildede
-
ikisini de asp bire yollarsın
birinci=request.querystring("birinci")
ikinci=request.querystring("ikinci")
işlemler bla bla
response.redirect("sayfa2.asp?ikinci=")& ikinci
sayfa2.asp de de querystringle işlemleri yapsan olmamı aslında iki querystringinde işlemlerini aynı sayfa da yapsan niye olmuyo neden bu gereksinim onu anlamadım
